Merge branch 'main' of github.com:recrof/map.meshcore.dev

This commit is contained in:
Rastislav Vysoky 2026-03-06 16:58:37 +01:00
commit b85c616511

View file

@ -282,13 +282,18 @@ const baseMaps = {
}),
};
let params = { lat: 7, lon: 25, zoom: 3 };
let params = { lat: 7, lon: 25, zoom: 3 };
const urlParams = Object.fromEntries(new URLSearchParams(location.search));
if(Number(urlParams.lat) && Number(urlParams.lon) && Number(urlParams.zoom)) {
params = urlParams
if(Number(urlParams.lat) && Number(urlParams.lon) && Number(urlParams.zoom)) {
params = urlParams
}
// console.log(params);
const map = window.leafletMap = leaflet.map('map', {
minZoom: 2,
maxBounds: [
@ -319,6 +324,9 @@ const icons = Object.fromEntries(['none', 'recent', 'stale', 'old', 'extinct'].m
createApp({
setup() {
const app = window.app = reactive({
nodes: [],
nodesByType: {},
filteredNodes: [],
nodes: [],
nodesByType: {},
filteredNodes: [],
@ -526,6 +534,9 @@ createApp({
app.urlParams.zoom = zoom;
app.urlParams.lat = pos.lat.toFixed(4);
app.urlParams.lon = pos.lng.toFixed(4);
app.urlParams.zoom = zoom;
app.urlParams.lat = pos.lat.toFixed(4);
app.urlParams.lon = pos.lng.toFixed(4);
});
onMounted(() => {
@ -556,4 +567,4 @@ createApp({
clearFilters
}
},
}).mount('#app')
}).mount('#app')