Last active
March 4, 2021 00:14
-
-
Save ntopulos/bbecc8380ea09eb5517e10be3c871b3e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!pip install ipyleaflet | |
from ipyleaflet import Map, Marker | |
center = (52.204793, 360.121558) | |
m = Map(center=center, zoom=15) | |
marker = Marker(location=center, draggable=True) | |
m.add_layer(marker); | |
display(m) | |
# Now that the marker is on the Map, you can drag it with your mouse, | |
# it will automatically update the `marker.location` attribute in Python | |
# You can also update the marker location from Python, that will update the | |
# marker location on the Map: | |
marker.location = (50, 356) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment