Merge remote-tracking branch 'upstream/pull/5577'
This commit is contained in:
commit
66f519d9cc
1 changed files with 5 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
|||
OSM.initializeNotesLayer = function (map) {
|
||||
var noteLayer = map.noteLayer,
|
||||
notes = {};
|
||||
let noteLoader;
|
||||
const noteLayer = map.noteLayer;
|
||||
let notes = {};
|
||||
|
||||
var noteIcons = {
|
||||
"new": L.icon({
|
||||
|
@ -25,6 +26,8 @@ OSM.initializeNotesLayer = function (map) {
|
|||
map.on("moveend", loadNotes);
|
||||
map.fire("overlayadd", { layer: noteLayer });
|
||||
}).on("remove", () => {
|
||||
if (noteLoader) noteLoader.abort();
|
||||
noteLoader = null;
|
||||
map.off("moveend", loadNotes);
|
||||
noteLayer.clearLayers();
|
||||
notes = {};
|
||||
|
@ -63,8 +66,6 @@ OSM.initializeNotesLayer = function (map) {
|
|||
return marker.id;
|
||||
};
|
||||
|
||||
var noteLoader;
|
||||
|
||||
function loadNotes() {
|
||||
var bounds = map.getBounds();
|
||||
var size = bounds.getSize();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue