jupyter-widgets / ipyleaflet

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

"Click to show javascript error" showing on generated map #1079

Closed iacisme closed 1 year ago

iacisme commented 1 year ago

Hi;

Can I please get some help resolving this issue?

The following code generates the map image posted below:

import leafmap

center_location = [55.1381, 14.9249]

base_map = leafmap.Map(center = center_location,
                                           zoom = 6,
                                           height = 1000,
                                          #width = 1500,
                                           draw_control = True,
                                           meausre_control = True,
                                           fullscreen_control = True,
                                           attribution_control = True,
                                          )

base_map

image

When I click on the error, this is the expanded message:

image

It tells me to look at the console output. Here is a top and bottom clip of the console output:

image

image

I've read the troubleshooting guide and tried the recommended steps found there but no success.

Until recently, the installation was working. The only change I've made was upgrade to the latest version of leafmap and leaflet, to try and resolve another issue, but cannot confirm if this is root cause.

leafmap version = 0.14.0 ipleaflet version = 0.17.1 ipywidgets version = 7.7.1 Jupyterlab version = 3.4.6

Thank you!

giswqs commented 1 year ago

This might be caused by dependency conflict in your env. Try creating a fresh conda env to install leafmap and ipyeaflet.

iacisme commented 1 year ago

Sounds good thank you.

Is there any order to the installation (ie: geemap first, then ipyleaflet, then leafmap) or does it matter?

Also, are there any packages that I should avoid installing in this environment? I just created a new python3.9 virtual environment dedicated to geo-analytics, hopefully to try and minimize future issues.

Right now the only things I have installed are scipy and jupyter lab.

Thanks for your help.

--Igor

giswqs commented 1 year ago

You might be interested in pygis or geospatial. One-liner to install most commonly used geospatial packages.

mamba install pygis -c conda-forge
iacisme commented 1 year ago

Awesome!

Thank you very much for your help and for resolving this issue.

I appreciate your time.

Cheers.

--Igor