Remove unused, fix global leak
This commit is contained in:
parent
2bf9144702
commit
d380ce79aa
1 changed files with 2 additions and 10 deletions
|
@ -1,7 +1,6 @@
|
|||
function initializeNotes(map) {
|
||||
var noteLayer = map.noteLayer,
|
||||
notes = {},
|
||||
newNote;
|
||||
notes = {};
|
||||
|
||||
var noteIcons = {
|
||||
"new": L.icon({
|
||||
|
@ -32,13 +31,6 @@ function initializeNotes(map) {
|
|||
noteLayer.clearLayers();
|
||||
notes = {};
|
||||
}
|
||||
}).on("popupclose", function (e) {
|
||||
if (newNote && e.popup == newNote._popup) {
|
||||
$(newNote).oneTime(10, "removenote", function () {
|
||||
map.removeLayer(newNote);
|
||||
newNote = null;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
noteLayer.on('click', function(e) {
|
||||
|
@ -92,7 +84,7 @@ function initializeNotes(map) {
|
|||
notes[feature.properties.id] = updateMarker(marker, feature);
|
||||
}
|
||||
|
||||
for (id in oldNotes) {
|
||||
for (var id in oldNotes) {
|
||||
noteLayer.removeLayer(oldNotes[id]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue