New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Leaflet.draw #344
Comments
I got that same issue, maybe someone can help use out with a working example. Much tnx |
As a workaround I had to create a
Then simply add the layer to drawnItems when you get the |
I did they exact same thing but for some reason when I draw a circle for example I don't see it getting painted on the layer...see my ctrl code below. I placed the css files inside my index.html. I can't figure out why this isn't working. I do see that the layer gets added to drawitems but nothing shows on map. Any help would be appreciated. var drawnItems = new L.FeatureGroup();
|
@Martijnvl Is it possible that you have missed adding the leafletData.getMap().then(function(map) {
map.addLayer(drawnItems);
}); Now I can at least add new shapes to the map. But somehow I have some strange issues with the editing functionality. Sometimes I can edit, but after adding a new shape the editing button is suddenly disabled. Then, after adding another shape, editing is suddenly possible again. I haven't been able to track down the reason for this behaviour. EDIT: I have further investigated my issues and it seems that every time I add a new shape, the editing toolbar is toggled. Does anybody have any ideas what could be causing this? |
This issue was moved to angular-ui/ui-leaflet#17 |
I'm going to rework&redesign angular-leaflet-directive to be compatible with Leaflet v1.0. It will mantain almost all its functionality, and will be compatible with the current features of the directive, but I must start from a fresh point, so I'm going to close this issue. If you think it must be worked with the new version, please reopen it. |
Trying to get the Leaflet.draw controls to work correctly. I can get the controls to show up on the map, and I can detect when the "draw:created" event is triggered, but when the layer is added to the map, the edit functionality doesn't work. I am guessing this is because I am supposed to add the layer to the "drawnItems" featureGroup, but that doesn't seem available from the directive in my controller. Am I missing something? Is there a way to get the declared "drawnItems" value from the directive from my controller? I am sure this is user error on my part.
Thanks in advance.
The text was updated successfully, but these errors were encountered: