How to display map object using ipyleaflet in jupyter notebook or jupyter Lab
See original GitHub issueI am trying to run jupyter notebook and/or jupyter Lab on mac book Catalina.
Code
from ipyleaflet import Map, Marker
start_location = (53.551086, 9.993682)
m = Map(center=start_location, zoom=16, scroll_wheel_zoom=True)
display(m)
I get no error message pops up in notebook. The map object does not display but gets created. type(m)
outputs ipyleaflet.leaflet.Map
In jupyter Lab I get this error message : Error displaying widget: model not found
I have followed these suggestions : ipyleaflet-map-object-doesnt-display-in-jupyter-notebook-but-it-gets-created and ipyleaflet/issues/504 but it did not solve my problem. .
I have run jupyter labextension install jupyter-leaflet
in my environment, and now get Loading widget...
as output in Jupyter Lab. They is still ne hint in Jupyter notebook
Any hints on what I should try next? Thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (7 by maintainers)
Top Results From Across the Web
Ipyleaflet map object doesn't display in Jupyter Notebook but it ...
I just tried to install ipyleaflet with Jupyter 5.2.3: conda install -c conda-forge ipyleaflet. and also didn't get a map.
Read more >ipyleaflet: Interactive maps in the Jupyter notebook ...
ipyleaflet : Interactive maps in the Jupyter notebook#. Try it online#. You can try ipyleaflet directly in this documentation page thanks to JupyterLite!...
Read more >FAQ - leafmap
If the interactive map does not show up on Jupyter Notebook and JupyterLab, it is probably because the ipyleaflet extension is not installed...
Read more >Interactive Maps in Jupyter - Descartes Labs Platform
The fastest and easiset way to get started with interactive maps is to use the Descartes Labs Workbench. There is no installation required,...
Read more >Displaying satellite imagery on a web map
Functionality it provides is exposed to Python users by ipyleaflet. This library enables interactive maps in the Jupyter notebook/JupyterLab environment.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You’ll also need to refresh the page to reload the JS
@Ninthpool It’s probably a version problem. You can try to install specific version of the
ipyleaflet
package (0.12.2). Version of@jupyter-widgets/jupyterlab-manager
also needs to be specified.So install
ipyleaflet
:conda install -c conda-forge ipyleaflet=0.12.2
then install
jupyter-leaflet
:jupyter labextension install @jupyter-widgets/jupyterlab-manager@1.1 jupyter-leaflet@0.12.2
note the @1.1 and @0.12.2 which specify specific versions
You can also check your
@jupyter-widgets/jupyterlab-manager
version withjupyter labextension list
You’ll get something like :