Clean up player marker transitions to/from visible map
This commit is contained in:
parent
ed8490fdbc
commit
fcc234bf3e
2 changed files with 42 additions and 21 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue