Rename updateMarker() to addCreatedNoteMarker()

This function doesn't update any existing marker.
This commit is contained in:
Anton Khorev 2024-12-25 03:38:30 +03:00
parent 9d8ca8be11
commit ae5b7812cc

View file

@ -49,7 +49,7 @@ OSM.NewNote = function (map) {
});
}
function updateMarker(feature) {
function addCreatedNoteMarker(feature) {
var marker = L.marker(feature.geometry.coordinates.reverse(), {
icon: noteIcons[feature.properties.status],
opacity: 0.9,
@ -144,7 +144,7 @@ OSM.NewNote = function (map) {
createNote(location, text, (feature) => {
content.find("textarea").val("");
updateMarker(feature);
addCreatedNoteMarker(feature);
noteLayer.removeLayer(newNoteMarker);
newNoteMarker = null;
addNoteButton.removeClass("active");