Omar
Omar

Reputation: 1

Ipyleaflet displaying gray map on Shiny

I have developed a dashboard on Shiny Python that contains an ipyleaflet map with a Choropleth gradient. Everything was going fine until I decided to ensure that it will run on other machines by creating a virtual environment and reinstalling all the libraries. Now the map displays a gray rectangle anytime the filters modify the map itself. I have also observed the same issue while using Shiny's template for the map-distance calculator (https://shiny.posit.co/py/templates/map-distance/). This can be replicated by running "shiny create --template map-distance --mode express --github posit-dev/py-shiny-templates" when the shiny library is installed.

Once I change the basemaps from the "Choose a basemap" filter, the map turns gray. As per the attached screenshot.

I have tried to downgrade the ipyleaflet and ipywidgets libraries as well as installing a newer version of python to no avail.

Upvotes: 0

Views: 36

Answers (1)

Omar
Omar

Reputation: 1

Solved: Called the map variable at the end of the reactive function. Everything works now.

Upvotes: 0

Related Questions