Comments (7)
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!
from ipyleaflet.
So, you are asking, can we replace leaflet-draw with geoman?
from ipyleaflet.
Awesome, yes, we should mention in the docs why both are there and direct people to the new one.
from ipyleaflet.
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.
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 initHook
feature of LeafletJS, which allows them to patch the creation of e.g. markers. This seems to cause some issues in some cases (I have difficulties spotting the exact cases for now). So not having leaflet-draw in the page may be good.
Also I'm wondering if those plugins will not collide.
from ipyleaflet.
Yes
from ipyleaflet.
Hey @martinRenou and @maartenbreddels! I took a look at this a while ago, so here are some of my thoughts on the discussion:
Would we be able to keep the same Python API while using geoman instead of leaflet-draw in the front-end?
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.
leaflet-draw makes use of the
initHook
feature of LeafletJS, which allows them to patch the creation of e.g. markers. This seems to cause some issues in some cases (I have difficulties spotting the exact cases for now).
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.
Also I'm wondering if those plugins will not collide.
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.
from ipyleaflet.
The company requesting/funding this feature asked if it was possible to advertise that they sponsor ipyleaflet. Would this be possible?
I think it's really good that people see a project like this can be sponsored, and I think it's fair to them.
Would a sponsor section in the main readme be ok?
from ipyleaflet.
Related Issues (20)
- bug: GeoData.on_hover() freezes when updates are too frequent
- use ipyleaflet to edit vector through leafmap and observate "ghost" polygon
- Set marker color/icon in DrawControl
- Question: does ipyleaflet support multi-part geometries editing?
- Error displaying widget: model not found HOT 4
- Doesn't work in Kaggle notebooks
- add color bar HOT 1
- Display text on map HOT 3
- Measure Control marker causes map to pan
- How to install ipyleaflet for JupyterHub HOT 1
- ipyleaflet is broken (missing file on CDN) HOT 6
- Issues with ipyleaflet 0.19 in Colab HOT 1
- Marker title does not update
- ipyleaflet 0.19.0 can't be installed with nbextension HOT 1
- Errors on Jupyter notebook 6.5.7 while running Velocity
- Cannot edit displayed speed unit "m/s"
- No visible/show attribute in MarkerCluster and Velocity
- Geemap/ipyleaflet not displaying map in Jupyter Notebooks HOT 3
- Create ML dataset using OSM HOT 2
- Failed to load model class
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ipyleaflet.