r-tmap / tmap

R package for thematic maps
https://r-tmap.github.io/tmap
GNU General Public License v3.0
868 stars 121 forks source link

Issues with tmap_leaflet #884

Closed silcordero closed 5 months ago

silcordero commented 5 months ago

Hello community!

I believe that all my software is up to date. However, I am having issues with a simple task, I am reviewing a script that I used last September (2023). Last September, the script worked without any issues. My issue is with the function _tmapleaflet. The map is not displayed when I render the call _tmap_leaflet(mymap). This, regardless of the data I used. For example:

# Libraries
library(tmap)
library(sf)

# Data
data("World")

# Map Composition

mymap <-qtm(
       World, 
       borders = "#f0f0f0", 
       fill="#a1d99b", 
       projection="ESRI:53042"
)

tmap_leaflet(mymap ) # It does not display the map on the Viewer Tab

tmap_leaflet(mymap , show=TRUE) # It does not display the map on the Viewer Tab

tmap_leaflet(mymap , mode="view",show=TRUE) # It does not display the map on the Viewer Tab

Here is my software information:

I am not sure if this could be useful, but if I tried to open the page on the browser, I get this error message:

The webpage at http://localhost:21700/session/viewhtml40c829ee7ace/index.html might be temporarily down or it may have moved permanently to a new web address. ERR_SOCKET_NOT_CONNECTED

I am not sure which could be the issue. I read an old post about the same issue, but the recommendation was to update the software, which is not my issue. Do you have any suggestions?

Thanks

silcordero commented 5 months ago

I tested the code on a different computer, and it worked. So, my educated guess is that it is something related to the configuration of my work computer...