Open Java-Jim opened 6 years ago
in this file: https://github.com/aratcliffe/Leaflet.contextmenu/blob/master/dist/leaflet.contextmenu.js
containerPoint = me._showLocation.containerPoint,
layerPoint = map.containerPointToLayerPoint(containerPoint),
latlng = map.layerPointToLatLng(layerPoint),
relatedTarget = me._showLocation.relatedTarget,
maybe the errors caused by multiple conversions
I have the problem that when a contextmenu item is clicked and in the corresponding callback function alert(e.latlng); is used, the resulting coordinate does not belong to the origin of the mouseclick event but rather to the point where the mousepointer is after selecting the contextmenu item. So the latlng is slightly offset to lower right of the click point. The lower the zoomlevel is the higher is the deviation between the clickpoint and reported coordinate.
How can i access the latlng coordinate of the mouseclick position independent how far i travel in the contextmenu with the mouse after right clicking on the map?