]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/notes.js.erb
Don't try and use OAuth if we don't have a token
[rails.git] / app / assets / javascripts / index / notes.js.erb
index bff4c446c371380261f095ac74fb3db695fb935d..e67749f07d20cbc44e1d188bae244fe0d8912322 100644 (file)
@@ -37,6 +37,7 @@ $(document).ready(function () {
     if (e.layer == noteLayer) {
       map.off("moveend", loadNotes);
       noteLayer.clearLayers();
+      notes = {};
     }
   });
 
@@ -170,6 +171,7 @@ $(document).ready(function () {
     $.ajax({
       url: url,
       type: "POST",
+      oauth: true,
       data: {
         lat: location.lat,
         lon: location.lng,
@@ -190,6 +192,7 @@ $(document).ready(function () {
     $.ajax({
       url: url,
       type: "POST",
+      oauth: true,
       data: {
         text: $(form.text).val()
       },