
Last chance! 50% off unlimited learning
Sale ends in
Customize tooltips for addDrawToolbar
handlersOptions(
polyline = list(error = "Error: shape edges cannot cross!",
tooltipStart = "Click to start drawing line.", tooltipCont =
"Click to start drawing line.", tooltipEnd = "Click to start drawing line."),
polygon = list(tooltipStart = "Click to start drawing shape.", tooltipCont =
"Click to start drawing shape.", tooltipEnd = "Click to start drawing shape."),
rectangle = list(tooltipStart = "Click and drag to draw rectangle."),
circle = list(tooltipStart = "Click map to place circle marker.", radius = "Radius"),
marker = list(tooltipStart = "Click map to place marker."),
circlemarker = list(tooltipStart = "Click and drag to draw circle.")
)
List of options for polyline tooltips.
List of options for polygon tooltips.
List of options for rectangle tooltips.
List of options for circle tooltips.
List of options for marker tooltips.
List of options for circlemarker tooltips.
if (FALSE) {
library(leaflet)
library(leaflet.extras)
leaflet() %>%
addTiles() %>%
addDrawToolbar(
handlers = handlersOptions(
polyline = list(
tooltipStart = "Click It",
tooltipCont = "Keep going",
tooltipEnd = "Make it stop"
),
),
polylineOptions = T, rectangleOptions = F, circleOptions = F,
polygonOptions = F, markerOptions = F, circleMarkerOptions = F
)
}
Run the code above in your browser using DataLab