[openstreetmap/openstreetmap-website] Enable exporting direction paths (PR #5694)

Marwin Hochfelsner notifications at github.com
Mon Feb 17 06:32:11 UTC 2025


@hlfan commented on this pull request.



> @@ -189,6 +192,20 @@ OSM.Directions = function (map) {
         turnByTurnTable.append(row);
       });
 
+      const download = exportGroup.toGeoJSON();
+      for (const i in endpoints) {
+        download.features[i].properties["marker-color"] = endpoints[i].marker.getElement().src.match(/marker-(\w+)/)[1];
+      }
+      const blob = new Blob([JSON.stringify(download)], { type: "application/json" });
+      URL.revokeObjectURL(downloadURL);
+      downloadURL = URL.createObjectURL(blob);
+
+      $("#sidebar_content").append(`<p class="text-center"><a href="${downloadURL}" download="${

It already gets cleared in line 158?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5694#discussion_r1957684454
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5694/review/2620137670 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250216/da51753a/attachment.htm>


More information about the rails-dev mailing list