Entering edit mode with some editable shapes not on map. #148

markgibbons25 opened this Issue Jun 13, 2013 · 1 comment

2 participants


I realise that in many cases this shouldn't be an issue with careful planning, but now I am using a MarkerClusterGroup and I want to be able to drag the markers that are in the group. When I add the markers within the cluster group and click edit I am getting:

Uncaught TypeError: Cannot read property '_leaflet_mousedown1' of null 

This is understandable because some of the markers are not on the map since I haven't clicked on the cluster group to expand them. If that is the case I would like the shapes that are in the editable feature group and also displayed on the map to be editable.

I can guess without looking at code that this can possibly be fixed in either leaflet or leaflet.draw, but it seems to apply here more.

Leaflet member

The layers that are editable are determined by the FeatureGroup that you pass into the draw control. I'm not what would be required to make Leaflet.draw and Leaflet.markercluster play nicely together but I would imagine it would be quite specialized. My suggestion would be to fork both and have a play.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment