Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface LocateOptions

Hierarchy

  • LocateOptions

Index

Properties

Optional enableHighAccuracy

enableHighAccuracy: boolean

Enables high accuracy, see description in the W3C spec.

Default value: false.

Optional maxZoom

maxZoom: number

The maximum zoom for automatic view setting when using setView option.

Default value: Infinity.

Optional maximumAge

maximumAge: number

Maximum age of detected location. If less than this amount of milliseconds passed since last geolocation response, locate will return a cached location.

Default value: 0.

Optional setView

setView: boolean

If true, automatically sets the map view to the user location with respect to detection accuracy, or to world view if geolocation failed.

Default value: false.

Optional timeout

timeout: number

Number of millisecond to wait for a response from geolocation before firing a locationerror event.

Default value: 10000.

Optional watch

watch: boolean

If true, starts continous watching of location changes (instead of detecting it once) using W3C watchPosition method. You can later stop watching using map.stopLocate() method.

Default value: false.