[英]R Leaflet: popup offset without using markers
Is there a way to offset popups (created independent of markers) in the R version of leaflet?有没有办法在传单的 R 版本中抵消弹出窗口(独立于标记创建)?
Experimenting with popup options I've managed to control the offset in X like this:尝试使用弹出选项,我设法像这样控制 X 中的偏移量:
popup_options <- popupOptions()
popup_options$offset <- x
This works to offset popups created with addPopups by x.这可以通过 x 偏移使用 addPopups 创建的弹出窗口。 I've tried these ideas:
我试过这些想法:
popup_options$offset <- c(x, y)
popup_options$offset <- "L.point(x,y);"
Finally, this works!最后,这有效! Somehow it gets recognised as a 'point' type by leaflet.
不知何故,它被传单识别为“点”类型。
popup_options$offset <- list(c(x, y))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.