r-tmap/tmap

Broken layer controls in the interactive mode

Opened this issue · 2 comments

# 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

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: r-spatial/leafem#58
When it is added to leafem::addStarsImage as well I can add this in tm_raster as well.

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 r-spatial/leafem#58