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 += `Longitude: ${crd.longitude}`;
|
||||
string += `More or less ${crd.accuracy} meters.`;
|
||||
|
||||
map.setView([latitude, longitude], 13);
|
||||
}
|
||||
|
||||
function error(err) {
|
||||
|
@ -44,7 +46,6 @@
|
|||
};
|
||||
|
||||
onMount(async () => {
|
||||
await loadWorker();
|
||||
leaflet = await import('leaflet');
|
||||
layerGroup = leaflet.layerGroup();
|
||||
|
||||
|
@ -55,10 +56,8 @@
|
|||
minZoom: 12
|
||||
});
|
||||
|
||||
const latlng = leaflet.latLng(latitude, longitude);
|
||||
alert(latitude)
|
||||
aler(longitude)
|
||||
map.setView(latlng, 13);
|
||||
await loadWorker();
|
||||
|
||||
map.setMaxBounds(map.getBounds());
|
||||
|
||||
leaflet
|
||||
|
|
Loading…
Reference in a new issue