leafsync icon indicating copy to clipboard operation
leafsync copied to clipboard

leafgl + leafsync with sync = "all"

Open mtennekes opened this issue 1 year ago • 0 comments

Probably found a bug:

library(leaflet)
library(leafgl)
library(sf)

gadm = st_as_sf(gadmCHE)
gadm = st_cast(gadm, "POLYGON")
cols = grey.colors(nrow(gadm))

lf = leaflet() %>%
	addProviderTiles(provider = providers$CartoDB.DarkMatter) %>%
	addGlPolygons(data = gadm, color = cols, popup = TRUE)

leafsync::latticeView(lf, lf, sync = "all")

At first it looks fine, but when I pan the map the polygon fill disappears. It only reappears after clicking on a polygon. Haven't tried the dev version of leafsync yet. Running:

leafem              0.2.3.9008 2024-11-20 [1] Github (r-spatial/leafem@86daec1)
 leafgl            * 0.2.2      2024-11-13 [1] CRAN (R 4.4.1)
 leaflegend          1.2.1      2024-05-09 [1] CRAN (R 4.4.0)
 leaflet           * 2.2.2      2024-03-26 [1] CRAN (R 4.4.0)
 leaflet.providers   2.0.0      2023-10-17 [1] CRAN (R 4.4.0)
 leafsync            0.1.0      2019-03-05 [1] CRAN (R 4.4.0)

mtennekes avatar Nov 28 '24 11:11 mtennekes