Add new note marker to root map layer instead of noteLayer
We want the new note marker in the same layer with its halo. Also we don't want to put anything in noteLayer because it clears its contents on certain zoom levels.
This commit is contained in:
parent
18f3adbf5d
commit
dc59b37fe1
1 changed files with 3 additions and 3 deletions
|
@ -115,7 +115,7 @@ OSM.NewNote = function (map) {
|
|||
newHalo(newNoteMarker.getLatLng(), a.type);
|
||||
});
|
||||
|
||||
newNoteMarker.addTo(noteLayer);
|
||||
newNoteMarker.addTo(map);
|
||||
newHalo(newNoteMarker.getLatLng());
|
||||
|
||||
newNoteMarker.on("remove", function () {
|
||||
|
@ -144,7 +144,7 @@ OSM.NewNote = function (map) {
|
|||
createNote(location, text, (feature) => {
|
||||
content.find("textarea").val("");
|
||||
addCreatedNoteMarker(feature);
|
||||
noteLayer.removeLayer(newNoteMarker);
|
||||
map.removeLayer(newNoteMarker);
|
||||
newNoteMarker = null;
|
||||
addNoteButton.removeClass("active");
|
||||
OSM.router.route("/note/" + feature.properties.id);
|
||||
|
@ -155,7 +155,7 @@ OSM.NewNote = function (map) {
|
|||
};
|
||||
|
||||
page.unload = function () {
|
||||
if (newNoteMarker) noteLayer.removeLayer(newNoteMarker);
|
||||
if (newNoteMarker) map.removeLayer(newNoteMarker);
|
||||
if (halo) map.removeLayer(halo);
|
||||
addNoteButton.removeClass("active");
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue