Closed oggioniale closed 3 years ago
Can you provide a reproducible example?
Yes of sure following the example provided in the addPopupImages help:
library(sf)
images = c("http://bit.ly/1TVwRiR",
"https://upload.wikimedia.org/wikipedia/commons/9/91/Octicons-mark-github.svg",
"https://www.r-project.org/logo/Rlogo.png",
"https://upload.wikimedia.org/wikipedia/commons/d/d6/MeanMonthlyP.gif")
pt4 = data.frame(x = jitter(rep(174.764474, 4), factor = 0.01),
y = jitter(rep(-36.877245, 4), factor = 0.01))
pt4 = st_as_sf(pt4, coords = c("x", "y"), crs = 4326)
leaflet::leaflet() %>%
leaflet::addTiles() %>%
leaflet::addMarkers(
data = pt4,
group = "points",
clusterOptions = leaflet::markerClusterOptions()
) %>%
leafpop::addPopupImages(images, group = "points", width = 400) # NOTE the gif animation
Thanks, I'll look into it soon
Should work now. Can you please retry?
YES!!! It work now!
in the following code, in which the
clusterOptions = leaflet::markerClusterOptions()
argument is included, the content of addMarkers popup is not visible and the image that appear is always the same: the first in the vector (in the case of this code the vector isallExif
).