Find yourself by location (mobile)
ff6347 opened this issue · 3 comments
ff6347 commented
Find yourself by location (mobile)
julizet commented
suggestion: usage of the mapbox geolocateControl()
I once used it for my ttn-tracker (which is obviusly not receiving any attention anymore).
However, geo-locating still works fine. This is the code snippet Is used:
// +++ function to user location on the map (blue dot) +++
// +++ important: only works within save environment (https or localhost) +++
const geoLocate = new mapboxgl.GeolocateControl({
positionOptions: {
enableHighAccuracy: true,
},
trackUserLocation: true,
showUserLocation: true,
});
map.addControl(geoLocate);
ff6347 commented
We had some issues on mobile with it. That’s why we decided against it before the release. Let’s review that again next week