[openstreetmap/openstreetmap-website] Map XML download with Turbo (PR #6255)

Marwin Hochfelsner notifications at github.com
Sat Jul 26 13:40:36 UTC 2025


hlfan left a comment (openstreetmap/openstreetmap-website#6255)

I could see the whole thing, including handleExportSuccess and handleExportError, made into a higher-order function that's called like:
```js
document.querySelector(".export_form").addEventListener("turbo:submit-end", getTurboDownload("map.osm"));
```
Or a more modular version with a callback:
```js
document.querySelector(".export_form").addEventListener("turbo:submit-end", getTurboBlobHandler(blob => downloadBlob(blob, "map.osm")));
```

But in any case, I'd like to have `downloadBlob` separately to reuse it for the directions geojson download.

As for where to store them, that's probably a question of whether there are any things to download outside of the index/map_layout pages; otherwise, I'd put it there and in the OSM namespace.

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

Message ID: <openstreetmap/openstreetmap-website/pull/6255/c3121874355 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250726/e6ba0058/attachment.htm>


More information about the rails-dev mailing list