
function SimpleMarkerManager(map,opt){var me=this;me._map=map;me._markers={};me._show={};me._new={};me._opts=opt||{};me._count=0;}
var _p=SimpleMarkerManager.prototype;_p.addMarker=function(id,marker){this._markers[id]=marker;this._count++;};_p.removeMarker=function(id){if(this._show[id]){this._map.removeOverlay(this._markers[id]);delete this._show[id];}
if(this._new[id]){delete this._new[id];}
delete this._markers[id];this._count--;};_p.getMarker=function(id){return this._markers[id];};_p.clearMarkers=function(){var a;for(a in this._show){this._map.removeOverlay(this._markers[a]);}
this._show={};this._markers={};this._new={};this._count=0;};_p.showMarker=function(id){this._new[id]=1;};_p.update=function(){var a;var t={};for(a in this._show){if(this._new[a]){delete this._new[a];t[a]=1;}}
for(a in this._show){if(!t[a]){this._map.removeOverlay(this._markers[a]);}}
for(a in this._new){t[a]=1;this._map.addOverlay(this._markers[a]);}
this._new={};this._show=t;if(this._opts.maxCache&&this._count>this._opts.maxCache){for(a in this._markers){if(!this._show[a]){delete this._markers[a];}}
this._count=0;for(a in this._markers){this._count++;}}};
