R: Options for the GPS Control

gpsOptions {leaflet.extras} | R Documentation

## Options for the GPS Control

### 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

    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

    leaflet() %>%
      addTiles() %>%
      addControlGPS()

[Package leaflet.extras version 1.0.0 Index]