Clean up player marker transitions to/from visible map

This commit is contained in:
Mike Primm 2011-07-31 12:41:01 -05:00
parent ed8490fdbc
commit fcc234bf3e
2 changed files with 42 additions and 21 deletions

View file

@ -48,6 +48,8 @@ L.CustomMarker = L.Class.extend({
}
map.off('viewreset', this._reset, this);
map = null;
},
getLatLng: function() {
@ -60,6 +62,8 @@ L.CustomMarker = L.Class.extend({
},
_reset: function() {
if(this._map == null)
return;
var pos = this._map.latLngToLayerPoint(this._latlng);
if (this._element) {