powered by
Add a zoom control to the map
add_zoom_control( map, position = "top-right", control_options = list(), panel_id = NULL, section_title = NULL, group_id = NULL )
The map proxy object for chaining.
The map or map proxy object.
The position of the zoom control on the map. Default is "top-right".
"top-right"
Additional options for the zoom control. Default is an empty list.
ID of control panel to add to (optional).
Section title when added to a control panel.
Optional ID of the group to add the control to within a panel.
add_zoom_control(map()) # Inside a control panel map() |> add_control_panel(panel_id = "my_panel", title = "View Controls") |> add_zoom_control(panel_id = "my_panel")
Run the code above in your browser using DataLab