X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/09e802b86c2f62ecf7aa5d28d714fda78d7359e5..db0858732511ee56d8d94f3b56cdaf3cd18d6ad8:/app/assets/javascripts/index/layers/notes.js?ds=inline diff --git a/app/assets/javascripts/index/layers/notes.js b/app/assets/javascripts/index/layers/notes.js index c0ba35d7e..1068472d5 100644 --- a/app/assets/javascripts/index/layers/notes.js +++ b/app/assets/javascripts/index/layers/notes.js @@ -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 });