[openstreetmap/openstreetmap-website] Enable exporting direction paths (PR #5694)
Tom Hughes
notifications at github.com
Mon Feb 17 09:17:10 UTC 2025
@tomhughes commented on this pull request.
> @@ -36,6 +36,9 @@ OSM.Directions = function (map) {
OSM.DirectionsEndpoint(map, $("input[name='route_to']"), OSM.MARKER_RED, endpointDragCallback, endpointChangeCallback)
];
+ const exportGroup = L.layerGroup([...endpoints.map(m => m.marker), polyline]);
+ let downloadURL = null;
+
Does this code need to be here, or can we move it down to be with the other code?
My concern is that the second code block makes assumptions about how the order of features in the layer group relates to the endpoints array that is established by this code and I can't see a good way to avoid that so I'd at least like to keep all the code together if we can.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5694#pullrequestreview-2620457669
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5694/review/2620457669 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250217/e0291033/attachment.htm>
More information about the rails-dev
mailing list