gps: Options for the GPS Control

Description Usage Arguments Examples

Description

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.

Usage

 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)

Arguments

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.

Examples

1
2
3
leaflet() %>%
  addTiles() %>%
  addControlGPS()

Example output

Loading required package: leaflet

leaflet.extras documentation built on May 2, 2019, 2:11 a.m.