adds geolocation to map
This commit is contained in:
@@ -567,7 +567,7 @@
|
|||||||
|
|
||||||
const startEndPoint = findStartAndEndPoints(geojson);
|
const startEndPoint = findStartAndEndPoints(geojson);
|
||||||
|
|
||||||
if(!startEndPoint.length) {
|
if (!startEndPoint.length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -735,6 +735,22 @@
|
|||||||
"top-left",
|
"top-left",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
map.addControl(
|
||||||
|
new M.GeolocateControl({
|
||||||
|
positionOptions: {
|
||||||
|
enableHighAccuracy: true,
|
||||||
|
},
|
||||||
|
fitBoundsOptions: {
|
||||||
|
animate: fitBounds == "animate"
|
||||||
|
},
|
||||||
|
trackUserLocation: true,
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (showStyleSwitcher) {
|
||||||
|
map.addControl(switcherControl);
|
||||||
|
}
|
||||||
|
|
||||||
if (showElevation) {
|
if (showElevation) {
|
||||||
epc = new ElevationProfileControl({
|
epc = new ElevationProfileControl({
|
||||||
visible: false,
|
visible: false,
|
||||||
@@ -765,9 +781,6 @@
|
|||||||
});
|
});
|
||||||
map.addControl(epc);
|
map.addControl(epc);
|
||||||
}
|
}
|
||||||
if (showStyleSwitcher) {
|
|
||||||
map.addControl(switcherControl);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (showFullscreen) {
|
if (showFullscreen) {
|
||||||
map.addControl(
|
map.addControl(
|
||||||
|
|||||||
Reference in New Issue
Block a user