GeolocateControlOptions
GeolocateControlOptions =
object
Defined in: ui/control/geolocate_control.ts:16
The GeolocateControl options object
Properties
fitBoundsOptions?
optionalfitBoundsOptions?:FitBoundsOptions
Defined in: ui/control/geolocate_control.ts:25
A options object to use when the map is panned and zoomed to the user's location. The default is to use a maxZoom of 15 to limit how far the map will zoom in for very accurate locations.
positionOptions?
optionalpositionOptions?:PositionOptions
Defined in: ui/control/geolocate_control.ts:21
A Geolocation API PositionOptions object.
Default Value
{enableHighAccuracy: false, timeout: 6000}
showAccuracyCircle?
optionalshowAccuracyCircle?:boolean
Defined in: ui/control/geolocate_control.ts:35
By default, if showUserLocation is true, a transparent circle will be drawn around the user location indicating the accuracy (95% confidence level) of the user's location. Set to false to disable. Always disabled when showUserLocation is false.
Default Value
showUserLocation?
optionalshowUserLocation?:boolean
Defined in: ui/control/geolocate_control.ts:40
By default a dot will be shown on the map at the user's location. Set to false to disable.
Default Value
trackUserLocation?
optionaltrackUserLocation?:boolean
Defined in: ui/control/geolocate_control.ts:30
If true the GeolocateControl becomes a toggle button and when active the map will receive updates to the user's location as it changes.
Default Value
zoomToUserAccuracy?
optionalzoomToUserAccuracy?:boolean
Defined in: ui/control/geolocate_control.ts:46
If true then map updates from the user's location may also change the map zoom level based on the location update accuracy. If false then the map zoom level will not change.
Has no effect when trackUserLocation is false.