Description Usage Arguments Examples
Options for the GPS Control
Add a gps to the Map.
Removes the GPS Control
Activate the GPS Control. You should have already added the GPS control before calling this method.
Deactivate the GPS Control. You should have already added the GPS control before calling this method.
1 2 3 4 5 6 7 8 9 10 | gpsOptions(position = "topleft", activate = FALSE, autoCenter = FALSE,
maxZoom = NULL, setView = FALSE)
addControlGPS(map, options = gpsOptions())
removeControlGPS(map)
activateGPS(map)
deactivateGPS(map)
|
position |
Position of the Control |
activate |
If TRUE activates the GPS on addition. |
autoCenter |
If TRUE auto centers the map when GPS location changes |
maxZoom |
If set zooms to this level when auto centering |
setView |
If TRUE sets the view to the GPS location when found |
map |
a map widget object |
options |
Options for the GPS control. |
1 2 3 | leaflet() %>%
addTiles() %>%
addControlGPS()
|
Loading required package: leaflet
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.