jupyter-widgets / ipyleaflet

A Jupyter - Leaflet.js bridge
https://ipyleaflet.readthedocs.io
MIT License
1.48k stars 363 forks source link

Panel 0.14.2 shows a ipyleaflet Map as grey #1084

Open itsgifnotjiff opened 1 year ago

itsgifnotjiff commented 1 year ago

Using Panel 0.14.2

import panel as pn
pn.extension('ipywidgets')
from ipyleaflet import Map, basemaps

center = [38.128, 2.588]
zoom = 5

m = Map(basemap=basemaps.OpenStreetMap.Mapnik, center=center, zoom=zoom)

pn.panel(m).servable(target='main')

image

jacksonhshields commented 1 year ago

I’ve got the exact same issue

matprov commented 1 year ago

@itsgifnotjiff Same here, have you found a correction?

itsgifnotjiff commented 1 year ago

I am also trying to find a way to plot an xarray dataset using hvplot quadmesh AND a basemap but get a dark gray background instead of any of the base maps. Let me know if you find a solution before me 😁

mangecoeur commented 1 year ago

Ran into this issue, when i try scrolling the map I see errors on the console like:

GET https://tile.openstreetmap.org/NaN/65580/43173.png

https://github.com/holoviz/panel/issues/4316 indicates it's a problem with the zoom not getting set.

lalligagger commented 1 year ago

Seeing the same thing using Marc's example here: https://discourse.holoviz.org/t/works-with-ipyleaflet/2755

As well as just:

from ipyleaflet import Map

m = Map(center=(52, 10), zoom=8, basemap=basemaps.OpenStreetMap.Mapnik)
mark = Marker(location=(51.5, 10))
m.add_layer(mark)
pn.serve(pn.panel(m))

Besides confirming the issue, I will add that I think the zoom is being set properly in my case. When I animate the marker it's still visible in the panel app and the zoom level looks right compared to its path. (Could also test with spaced markers.)

lalligagger commented 1 year ago

Downgrade to ipyleaflet 0.17.0 worked for me.