function setupGetInViewMarkers(map) {
	if(typeof(map.getInViewMarkers) == 'function')
		return;

	setupGetMarkers(map);

	map.getInViewMarkers = function() {
		var m = this.getMarkers();
		var a = [];
		var b = this.getBounds();
		for(var i = 0; i < m.length; i++)
			if(b.contains(m[i].getPoint()))
				a.push(m[i]);
		return a;
	};
}
setupGetInViewMarkers.version = 0.1;

function setupGetOffViewMarkers(map) {
	if(typeof(map.getOffViewMarkers) == 'function')
		return;

	setupGetMarkers(map);

	map.getOffViewMarkers = function() {
		var m = this.getMarkers();
		var a = [];
		var b = this.getBounds();
		for(var i = 0; i < m.length; i++)
			if(!b.contains(m[i].getPoint()))
				a.push(m[i]);
		return a;
	};
}
setupGetOffViewMarkers.version = 0.1;

