jupyter-widgets / ipyleaflet

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

enable to see map but not any layer #981

Open Cimeliere opened 2 years ago

Cimeliere commented 2 years ago

Hello,

I try to execute this code example :

`center = (52.204793, 360.121558)

m = Map(center=center, zoom=15)

marker = Marker(location=center, draggable=False) m.add_layer(marker) m`

With it I see correctly the map but not the marker...

I use jupyter lab No error is shown in the notebook and it seems no error in the console due to the execution of this cell... Any idea ??

Thanks for your help

console

giswqs commented 2 years ago

The longitude range should be [-180,180].

Cimeliere commented 2 years ago

Unfortunately, I have the same result with center = (52.204793, 0.121558) instead of (52.204793, 360.121558)

(this center is also used to display the map, and I can see the map perfectly, my problem is for the layers I try to add)

giswqs commented 2 years ago

It works fine on my end. Try creating a fresh conda env to install ipyleaflet

Cimeliere commented 2 years ago

I am not really used on "conda env" do you have an example ?

giswqs commented 2 years ago

Go to https://ipyleaflet.readthedocs.io/en/latest/. You can try out ipyleaflet interactively. Paste your code into the code cell.

Cimeliere commented 2 years ago

Yes it works online...