r-tmap / tmap

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

Broken layer controls in the interactive mode #882

Open Nowosad opened 3 months ago

Nowosad commented 3 months ago
# remotes::install_github("r-tmap/tmap")
library(tmap)
library(terra)
tmap_mode("view")
srtm = rast(system.file("raster/srtm.tif", package = "spDataLarge"))
tm_shape(srtm) +
  tm_raster()

Peek 2024-05-25 18-47

mtennekes commented 3 months ago

This issue was also there in v3. It has to do with the missing pane option of addRasterImage. The good news it that it seems to be fixed in leaflet 2.2.2: https://github.com/r-spatial/leafem/issues/58 When it is added to leafem::addStarsImage as well I can add this in tm_raster as well.

mtennekes commented 2 weeks ago

Apparently, this is still not fixed (#921) :(

The problem is that raster layers are still placed in the leaflet-tile-pane instead of leaflet-tmap4xx-pane.

Upstream ping https://github.com/r-spatial/leafem/issues/58