R shiny 这里有一个类似的问题:Control the size of popupImage from leaflet in r shiny
但我正在使用flexdashboard。我没有 CSS 的背景。如何调整大小?下面的示例代码:
library(leaflet)
library(mapview)
leaflet() %>%
addProviderTiles(providers$Esri.WorldStreetMap) %>%
addRectangles(
lng1 = bbox_north2$p1$long, lat1 = bbox_north2$p1$lat,
lng2 = bbox_north2$p2$long, lat2 = bbox_north2$p2$lat,
fillColor = "red", stroke = FALSE,
popup = popupImage(here::here("products", "north1.png"), width = 800, height = 600, embed = TRUE)
设置width = 800
时,弹出窗口显示较大,但其中一部分显示为灰色。