Customize tooltips for addDrawToolbar
Usage
handlersOptions(
polyline = list(error = "<strong>Error:</strong> 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."),
simpleshape = list(tooltipEnd = "Release mouse to finish drawing.")
)
Arguments
- polyline
List of options for polyline tooltips.
- polygon
List of options for polygon tooltips.
- rectangle
List of options for rectangle tooltips.
- circle
List of options for circle tooltips.
- marker
List of options for marker tooltips.
- circlemarker
List of options for circlemarker tooltips.
- simpleshape
List of options for simpleshape tooltips.
Examples
if (FALSE) { # \dontrun{
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
)
} # }