-
Notifications
You must be signed in to change notification settings - Fork 364
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
Geoman support as draw controls alternative? #1165
Comments
Hey Maarten! 😃 Thanks for opening an issue. Sounds good to me. We can probably start by introducing a geoman control as you suggest, and add a note in the documentation to suggest using this one instead of the old leaflet-draw. Happy to review a PR! |
Awesome, yes, we should mention in the docs why both are there and direct people to the new one. |
Would we be able to keep the same Python API while using geoman instead of leaflet-draw in the front-end? It seems that having leaflet-draw there could break ipyleaflet entirely. leaflet-draw makes use of the Also I'm wondering if those plugins will not collide. |
So, you are asking, can we replace leaflet-draw with geoman? |
Yes |
Hey @martinRenou and @maartenbreddels! I took a look at this a while ago, so here are some of my thoughts on the discussion:
The one thing where I don't think there is at least feature parity is polyline, which I don't think Geoman has. Otherwise I don't foresee any issues with this that can't be overcome.
Correct me if I'm wrong, but I think that Geoman also uses the initHook, since it initializes itself automatically. There is an option to not automatically initialize, but initHook is still used on layers/maps where we want to enable Geoman. Let me know if you manage to pin down any particular issues / what kinds of issues you think might come up.
In my (admittedly brief) exploration of this I didn't run into any issues. I don't know if this might be the case when both are activated. |
The company requesting/funding this feature asked if it was possible to advertise that they sponsor ipyleaflet. Would this be possible? Would a sponsor section in the main readme be ok? |
Hi,
We've been looking into the draw controls for ipyleaflet. One thing we were interested in (cc @mangecoeur ) was controlling the draw controls programmatically, using our own controls (not the builtin toolbar).
It seems this is not possible with the leaflet-draw plugin (bad design?), and the project seems dead:
Most people suggest using Geoman / https://github.com/geoman-io/leaflet-geoman in the above issues, which seems like a good alternative.
I always hate breaking changes, so I suggest we add Geoman draw controls to ipyleaflet, and keep the current draw controls as they are right now.
Will a PR for this likely be merged for ipyleaflet if we do the work?
cc @iisakkirotko @mariobuikhuizen
Regards,
Maarten
The text was updated successfully, but these errors were encountered: