content = $('#sidebar_content'),
page = {},
addNoteButton = $(".control-note .control-button"),
- newNote;
+ newNote,
+ halo;
var noteIcons = {
"new": L.icon({
e.preventDefault();
e.stopPropagation();
+ if ($(this).hasClass('disabled')) return;
+
OSM.route('/new_note');
});
newNote.addTo(noteLayer);
+ halo = L.circleMarker(map.containerPointToLatLng(markerPosition), {
+ weight: 2.5,
+ radius: 20,
+ fillOpacity: 0.5,
+ color: "#FF6200"
+ });
+
+ map.addLayer(halo);
+
newNote.on("remove", function () {
addNoteButton.removeClass("active");
}).on("dragstart",function () {
page.unload = function () {
noteLayer.removeLayer(newNote);
+ map.removeLayer(halo);
addNoteButton.removeClass("active");
};