On this page

Type Alias GeolocateControlOptions

The GeolocateControl options object

type GeolocateControlOptions = {
    fitBoundsOptions?: FitBoundsOptions;
    positionOptions?: PositionOptions;
    showAccuracyCircle?: boolean;
    showUserLocation?: boolean;
    trackUserLocation?: boolean;
}
Index

Properties

fitBoundsOptions?: FitBoundsOptions

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?: PositionOptions

A Geolocation API PositionOptions object.

{enableHighAccuracy: false, timeout: 6000}

showAccuracyCircle?: boolean

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.

true
showUserLocation?: boolean

By default a dot will be shown on the map at the user's location. Set to false to disable.

true
trackUserLocation?: boolean

If true the GeolocateControl becomes a toggle button and when active the map will receive updates to the user's location as it changes.

false
Was this helpful?
SDK JS
Reference
GeolocateControlOptions