-
-
Notifications
You must be signed in to change notification settings - Fork 669
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 element for interactive maps #1217
Conversation
# Conflicts: # DEPENDENCIES.md # nicegui/ui.py
# Conflicts: # DEPENDENCIES.md # npm.json
This PR is finally taking shape. The basic functionality is there, but the map is not visible when accessed via NiceGUI On Air. By the way: I introduced yet another mechanism for adding JavaScript libraries. By calling |
I've split the demos for using other map styles and adding markers to gain more clarity for each demo. I've noticed two things:
|
@rodja I just finished the demo for From my point of view this PR is ready to merge. Maybe you can check the demos once again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I was about to merge this but then discovered that the zoom in/out buttons of the first demo are not working at all.
@rodja Thanks for spotting the zoom bug. Besides a type there have been even more bugs potentially causing endless event loops. But it should be fixed now. Besides that I added some more options to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonderful.
I've started to implement an official Leaflet element for NiceGUI. It is quite an undertaking with a similar complexity like
ui.scene
.So far we can use it like this:
The goal is allowing to interactively edit markers and geometric shapes like in this Leaflet demo:
https://leaflet.github.io/Leaflet.draw/docs/examples/full.html
Open tasks
use_draw_controls
?location
tolatlng
(marker) orcenter
(map)options
parameter for initializerrun_method
(independent ofoptions
)