X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/9cd8c4006c1c2611bb7cbb4ffb513050d0611fe7..6d8d41b166d59ddb3250d7b8d5b5f275c86bedf1:/app/assets/javascripts/index/note.js diff --git a/app/assets/javascripts/index/note.js b/app/assets/javascripts/index/note.js index f0b7dae27..a77735c95 100644 --- a/app/assets/javascripts/index/note.js +++ b/app/assets/javascripts/index/note.js @@ -2,24 +2,6 @@ OSM.Note = function (map) { const content = $("#sidebar_content"), page = {}; - const noteIcons = { - "new": L.icon({ - iconUrl: OSM.NEW_NOTE_MARKER, - iconSize: [25, 40], - iconAnchor: [12, 40] - }), - "open": L.icon({ - iconUrl: OSM.OPEN_NOTE_MARKER, - iconSize: [25, 40], - iconAnchor: [12, 40] - }), - "closed": L.icon({ - iconUrl: OSM.CLOSED_NOTE_MARKER, - iconSize: [25, 40], - iconAnchor: [12, 40] - }) - }; - page.pushstate = page.popstate = function (path, id) { OSM.loadSidebarContent(path, function () { const data = $(".details").data(); @@ -87,7 +69,7 @@ OSM.Note = function (map) { type: "note", id: parseInt(id, 10), latLng: L.latLng(data.coordinates.split(",")), - icon: noteIcons[data.status] + icon: OSM.getMarker({ icon: `${data.status}_NOTE_MARKER`, shadow: false, height: 40 }) }, function () { if (!hashParams.center && !skipMoveToNote) { const latLng = L.latLng(data.coordinates.split(","));