main marker always on top

This commit is contained in:
Zhora Shalyapin 2025-04-04 09:09:46 +00:00
parent d5e32b4829
commit 9cc991c286

11
main.js
View File

@ -1676,6 +1676,16 @@
}
}
function makeCurrentPointHigherOnMap() {
map.eachLayer(function (layer) {
if (layer instanceof L.Marker) {
if (layer.getElement().classList.contains("leaflet-marker-draggable")) {
layer.setZIndexOffset(9999)
}
}
})
}
function addRoutesList() {
(async () => {
let routes = await getRoutes()
@ -2087,6 +2097,7 @@
/* MAP */
formatMap()
makeCurrentPointHigherOnMap()
addRoutesList()
/* DIALOG */