diff --git a/components/Map.vue b/components/Map.vue index 07b0a84e81d5e76ac86b3b6dd19fb78d7c817bff..2a4119cb21b1d243db39ad8851e7633b4aeebb42 100644 --- a/components/Map.vue +++ b/components/Map.vue @@ -37,6 +37,17 @@ export default { hash: 'map', customAttribution: this.customAttribution, }); + + const geolocateControl = new maplibregl.GeolocateControl({ + positionOptions: { + enableHighAccuracy: true, + }, + trackUserLocation: false, + showUserLocation: true, + }); + + this.map.addControl(geolocateControl, 'bottom-left'); + this.map.on('load', () => { if (this.popUpLayer != '') this.addPopupsToLayer(this.popUpLayer); });