Show only description as a marker tooltip in note layer

This commit is contained in:
Anton Khorev 2025-01-29 17:57:26 +03:00
parent 09e802b86c
commit db08587325
2 changed files with 48 additions and 1 deletions

View file

@ -40,9 +40,16 @@ OSM.initializeNotesLayer = function (map) {
if (marker) {
marker.setIcon(noteIcons[feature.properties.status]);
} else {
let title;
const description = feature.properties.comments[0];
if (description?.action === "opened") {
title = description.text;
}
marker = L.marker(feature.geometry.coordinates.reverse(), {
icon: noteIcons[feature.properties.status],
title: feature.properties.comments[0].text,
title,
opacity: 0.8,
interactive: true
});