+ if (map.hasLayer(currentNote)) map.removeLayer(currentNote);
+ currentNote = L.marker(latLng, {
+ icon: noteIcons[data.status],
+ opacity: 1,
+ clickable: true
+ });
+ map.addLayer(currentNote);
+ };
+
+ page.unload = function () {
+ if (map.hasLayer(halo)) map.removeLayer(halo);
+ if (map.hasLayer(currentNote)) map.removeLayer(currentNote);
+ };
+
+ return page;