map.on("popupclose", function (e) {
if (newNote && e.popup == newNote._popup) {
$(newNote).oneTime(10, "removenote", function () {
map.removeLayer(newNote);
map.on("popupclose", function (e) {
if (newNote && e.popup == newNote._popup) {
$(newNote).oneTime(10, "removenote", function () {
map.removeLayer(newNote);