[openstreetmap/openstreetmap-website] Directions export should use GeoJSON MIME type (Issue #6388)
Minh Nguyễn
notifications at github.com
Mon Sep 8 17:45:46 UTC 2025
1ec5 created an issue (openstreetmap/openstreetmap-website#6388)
#5694 added a link to download directions as GeoJSON. However, when I click this link, the browser gives it a .json extension, which is incompatible with some GeoJSON consumers. This appears to be because we’re setting the blob’s MIME type to JSON, which browsers map to the .json extension:
https://github.com/openstreetmap/openstreetmap-website/blob/c97fff3965bb12d3588e98656f21b15ae6a322db/app/assets/javascripts/index/directions-route-output.js#L133
The official MIME type for GeoJSON is `application/geo+json`, which results in a .geojson extension (at least in Firefox 143 for macOS). Migrating to that MIME type would help the user better keep track of what they’ve downloaded and use it more easily. The downside is that maybe fewer applications would recognize the .geojson extension, but these applications are less likely to do anything special for GeoJSON versus regular JSON.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/6388
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/6388 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250908/b4a4d38d/attachment-0001.htm>
More information about the rails-dev
mailing list