Skip to content

@smartmaps/smartmaps-gl


@smartmaps/smartmaps-gl / GeolocateControl

Class: GeolocateControl

Control provides a button that uses the browser's geolocation API to locate the user on the map. Add geolocate control to the map.

Remarks

can be activated/disabled with the option MapOptions

Extends

  • GeolocateControl

Constructors

new GeolocateControl()

new GeolocateControl(options): GeolocateControl

Parameters

options

GeolocateControlOptions

Returns

GeolocateControl

Overrides

MaplibreGeolocateControl.constructor

Methods

onAdd()

onAdd(map): HTMLElement

{@inheritDoc IControl.onAdd}

Parameters

map

Map$1

Returns

HTMLElement

Overrides

MaplibreGeolocateControl.onAdd