openstmap interface

move diameter to radius conversion into toBounds()
pull/3169/head
Erik Andresen 2024-01-30 07:30:11 +01:00
parent d007f82a19
commit fa433a4767
1 changed files with 2 additions and 2 deletions

View File

@ -191,8 +191,8 @@ TODO:
maxZoom: 18
}).addTo(map);
let marker = new L.marker(latlon).addTo(map);
const dist = mapLoaded.mapInfo.scale * mapLoaded.mapInfo.tilesize * mapLoaded.mapInfo.w / 2;
map.fitBounds(latlon.toBounds(dist/*meters*/), {animation: false});
const dist = mapLoaded.mapInfo.scale * mapLoaded.mapInfo.tilesize * mapLoaded.mapInfo.w;
map.fitBounds(latlon.toBounds(dist/2/*meters*/), {animation: false});
});
}, 0);