X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/b7c171d2736140cfc8bbd30ae4911c8e52f5f07a..06cece27fe691e321cf42a03e3ec08c464ac1444:/app/assets/javascripts/index/layers/notes.js diff --git a/app/assets/javascripts/index/layers/notes.js b/app/assets/javascripts/index/layers/notes.js index 75bd73bce..24bf969b3 100644 --- a/app/assets/javascripts/index/layers/notes.js +++ b/app/assets/javascripts/index/layers/notes.js @@ -43,9 +43,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 });