Bookmarklet helpers for resolving OSM Notes

I made 2 bookmarklets that you could find useful.

  1. View OSM data snapshot at the time of note creation (or in case of / Organic Maps - downloaded map file timestamp). This is useful for old notes where you suspect the issue has been already addressed, but you need context to close the Note.
javascript:(function(){var id=location.href.match(/www\.openstreetmap\.org\/note\/(\d+)/);if(id!=null){var req=new XMLHttpRequest;"GET",""+id[1]+".json",false);req.send(null);var note=JSON.parse(req.responseText);var date=new Date(" UTC",""));var lat=note.geometry.coordinates[1];var lon=note.geometry.coordinates[0];var zoom=18;var isoDate=date.toISOString();var[0].text;var osmDataVersion=noteText.match(/OSM data version\: ([\d]{4}-[\d]{2}-[\d]{2}T[\d]{2}\:[\d]{2}\:[\d]{2}\Z)/);if(osmDataVersion!=null){isoDate=osmDataVersion[1]}var queryString='[date:"'+isoDate+'"];\n(\n  node({{bbox}});\n  way({{bbox}});\n  //relation({{bbox}});\n);\r\nout meta;\n>;\nout meta qt;';""+escape(queryString)+"&C="+lat+";"+lon+";"+zoom+"&R")}else{alert("This is not a valid OSM note page.")}})();
  1. Translate a note (you can change en to another language code which Google Translate understands).
javascript:(function(){var id=location.href.match(/www\.openstreetmap\.org\/note\/(\d+)/);if(id!=null){var req=new XMLHttpRequest;"GET", ""+id[1]+".json",false);req.send(null);var note=JSON.parse(req.responseText);var[0].text;""+encodeURI(noteText))}else{alert("This is not a valid OSM note page.")}})();

How to use: Open bookmarks menu in your browser and paste above text as URL, save. Navigate to a note page and open the bookmarkpet

1 post - 1 participant

Read full topic

Ce sujet de discussion accompagne la publication sur