[openstreetmap/openstreetmap-website] Enable exporting direction paths (PR #5694)
Holger Jeromin
notifications at github.com
Mon Feb 17 05:38:12 UTC 2025
@HolgerJeromin 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="${
You clean up the old objectUrl but do not clean up sidebar_content.
By reading the code this could perhaps result in multiple `<p>`
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5694#pullrequestreview-2620070731
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5694/review/2620070731 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250216/45a3af5c/attachment.htm>
More information about the rails-dev
mailing list