Update center ositioning of current location
All checks were successful
ci/woodpecker/push/build Pipeline was successful
All checks were successful
ci/woodpecker/push/build Pipeline was successful
This commit is contained in:
parent
e287ba1043
commit
80c53c6de6
1 changed files with 4 additions and 5 deletions
|
@ -34,6 +34,8 @@
|
||||||
string += `Latitude : ${crd.latitude}`;
|
string += `Latitude : ${crd.latitude}`;
|
||||||
string += `Longitude: ${crd.longitude}`;
|
string += `Longitude: ${crd.longitude}`;
|
||||||
string += `More or less ${crd.accuracy} meters.`;
|
string += `More or less ${crd.accuracy} meters.`;
|
||||||
|
|
||||||
|
map.setView([latitude, longitude], 13);
|
||||||
}
|
}
|
||||||
|
|
||||||
function error(err) {
|
function error(err) {
|
||||||
|
@ -44,7 +46,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
await loadWorker();
|
|
||||||
leaflet = await import('leaflet');
|
leaflet = await import('leaflet');
|
||||||
layerGroup = leaflet.layerGroup();
|
layerGroup = leaflet.layerGroup();
|
||||||
|
|
||||||
|
@ -55,10 +56,8 @@
|
||||||
minZoom: 12
|
minZoom: 12
|
||||||
});
|
});
|
||||||
|
|
||||||
const latlng = leaflet.latLng(latitude, longitude);
|
await loadWorker();
|
||||||
alert(latitude)
|
|
||||||
aler(longitude)
|
|
||||||
map.setView(latlng, 13);
|
|
||||||
map.setMaxBounds(map.getBounds());
|
map.setMaxBounds(map.getBounds());
|
||||||
|
|
||||||
leaflet
|
leaflet
|
||||||
|
|
Loading…
Reference in a new issue