For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.
Type Alias GeolocateControlEventType
type GeolocateControlEventType = {
error: GeolocateErrorEvent;
geolocate: GeolocatePositionEvent;
outofmaxbounds: GeolocatePositionEvent;
trackuserlocationend: GeolocateEvent;
trackuserlocationstart: GeolocateEvent;
userlocationfocus: GeolocateEvent;
userlocationlostfocus: GeolocateEvent;
}
error: GeolocateErrorEvent;
geolocate: GeolocatePositionEvent;
outofmaxbounds: GeolocatePositionEvent;
trackuserlocationend: GeolocateEvent;
trackuserlocationstart: GeolocateEvent;
userlocationfocus: GeolocateEvent;
userlocationlostfocus: GeolocateEvent;
}
Properties
error
Fired on each Geolocation API position update which returned as an error.
geolocate
Fired on each Geolocation API position update which returned as success.
outofmaxbounds
Fired on each Geolocation API position update which returned as success but the user position is out of map maxBounds.
trackuserlocationend
Fired when the geolocate control changes to the background state.
trackuserlocationstart
Fired when the geolocate control changes to the active lock state.
userlocationfocus
Fired when the geolocate control's button is clicked in the active lock state.
userlocationlostfocus
Fired when the user changes the viewport while in the active lock state.
GeolocateControlEventType- a mapping between the geolocate control event name and the event value. These events are used with the GeolocateControl.on method.