MrMufflon / Leaflet.Coordinates

Leaflet plugin to view mouse coordinates
http://mrmufflon.github.io/Leaflet.Coordinates/
Other
104 stars 55 forks source link

Markers are created, but then disappear when clicked on #22

Open TedEwanchyna opened 8 years ago

TedEwanchyna commented 8 years ago

problem: clicking on the newly created marker removes it instead of popping up the information, for example: Longitude: -2,94 Latitude: 33,94 Remove

My workaround:

and in _createNewMarker return the evaluated string... _createNewMarker: function() { // return this.options.markerType(null, this.options.markerProps); return eval(this.options.markerType + '(null,' + this.options.markerProps + ')'); }

TedEwanchyna commented 8 years ago

also in function collapse, don't call _ordinateLabel, call _createCoordinateLabel

<               label.innerHTML = this._createCoordinateLabel(ll);
---
>               label.innerHTML = this._ordinateLabel(ll);
pedroetb commented 8 years ago

I had same problem too. It's working fine at 062f7596a0304cc3676e38d172dbd4b682fd9e4b