[openstreetmap/openstreetmap-website] When downloading image by "Share", allow other map styles with static image APIs (PR #4973)

David Tsiklauri notifications at github.com
Wed Jul 10 11:21:20 UTC 2024


This PR addresses "When downloading image by 'Share', allow other map styles with static image APIs" issue mentioned in the https://github.com/openstreetmap/openstreetmap-website/issues/1886

Added API for downloading Transport and Cycle Map images, as they are supported by the [ThunderForest](https://www.thunderforest.com/docs/static-maps-api/). Also changed unsupported map text to show that not only Standard, but Transport and Cycle Map layers also have downloading capability. Fixes https://github.com/openstreetmap/openstreetmap-website/issues/1886

Transport layer:
![Screenshot 2024-07-10 140949](https://github.com/openstreetmap/openstreetmap-website/assets/55288419/6ebd6d04-026e-4ef1-81cf-cbc6a3dcc6ab)

Cycle Map layer:
![Screenshot 2024-07-10 141009](https://github.com/openstreetmap/openstreetmap-website/assets/55288419/022bb17a-35f8-4619-af1c-be6f3697066d)

Unsupported Humanitarian layer:
![Screenshot 2024-07-10 141024](https://github.com/openstreetmap/openstreetmap-website/assets/55288419/98c9ae8a-f93d-4a3f-b075-a05bf8be6c9b)

You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/4973

-- Commit Summary --

  * When downloading image, allow other map styles

-- File Changes --

    M app/assets/javascripts/leaflet.share.js (45)
    M app/controllers/export_controller.rb (14)
    M config/locales/en.yml (2)
    M test/controllers/export_controller_test.rb (14)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/4973.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4973.diff

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

Message ID: <openstreetmap/openstreetmap-website/pull/4973 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240710/5f2c8650/attachment-0001.htm>


More information about the rails-dev mailing list