Vlad
Vlad

Reputation: 3764

Popup offset without using markers

Is there a way to offset popups (created independent of markers) in the R version of leaflet?

Experimenting with popup options I've managed to control the offset in X like this:

popup_options <- popupOptions()
popup_options$offset <- x

This works to offset popups created with addPopups by x. I've tried these ideas:

popup_options$offset <- c(x, y)
popup_options$offset <- "L.point(x,y);"

Upvotes: 1

Views: 400

Answers (1)

Vlad
Vlad

Reputation: 3764

Finally, this works! Somehow it gets recognised as a 'point' type by leaflet.

popup_options$offset <- list(c(x, y))

Upvotes: 1

Related Questions