Leaflet / Leaflet.draw

Vector drawing and editing plugin for Leaflet
https://leaflet.github.io/Leaflet.draw/docs/leaflet-draw-latest.html
MIT License
1.96k stars 992 forks source link

layerPointToLatLng() is not used on `Edit Mode` with Markers #1030

Open cavasinf opened 2 years ago

cavasinf commented 2 years ago

How to reproduce

  1. Override function layerPointToLatLng from L.Map.include...
  2. Create a Marker and place it (it will follow layerPointToLatLng())
  3. Enter in Edit mode
  4. Now the marker doesn't follow the layerPointToLatLng function

ErrorEditControlsLeaflet

What behaviour I'm expecting and which behaviour I'm seeing

Like for "shape drawing", markers on edit mode should use the function layerPointToLatLng.

Minimal example reproducing the issue

Here is a JsFiddle demo : https://jsfiddle.net/florian_allsoftware/ghnkm46q/10/