if (e.layer == noteLayer) {
map.off("moveend", loadNotes);
noteLayer.clearLayers();
+ notes = {};
}
});
if (newNote && e.popup == newNote._popup) {
$(newNote).oneTime(10, "removenote", function () {
map.removeLayer(newNote);
+ newNote = null;
});
}
});
$.ajax({
url: url,
type: "POST",
+ oauth: true,
data: {
lat: location.lat,
lon: location.lng,
},
success: function (feature) {
notes[feature.properties.id] = updateMarker(marker, feature);
+ newNote = null;
- $(".leaflet-popup-close-button").off("click.close");
$("#createnoteanchor").removeClass("disabled").addClass("geolink");
}
});
$.ajax({
url: url,
type: "POST",
+ oauth: true,
data: {
text: $(form.text).val()
},