Skip to content

Add support for other online XYZ sources#9

Merged
rudokemper merged 3 commits into
mainfrom
add-support-for-other-online-sources
Jan 25, 2024
Merged

Add support for other online XYZ sources#9
rudokemper merged 3 commits into
mainfrom
add-support-for-other-online-sources

Conversation

@rudokemper
Copy link
Copy Markdown
Member

Goal

The goal of this PR is to add support for additional XYZ tile sources, and make it easier to add new ones in the future

What I changed

  • Any code related to a concern of downloading XYZ tiles has been moved to its own file download_resources for legibility.
  • Added a handler function requestOnlineTiles, which calls downloadOnlineTiles and returns a promise.
  • downloadOnlineTiles takes a source and uses a URL associated with each to downloads XYZ tiles. In the case of Bing, quadkeys are used to get the tiles, but other sources (like Esri and Google) use the same endpoint structure so the function will JustWork™ with them.
  • Terms of service for the supported services has been added.

Screenshots

image
Esri

image
Bing

image
Google

What I'm not doing here

Adding support for OSM. Per OSM's tile usage policy,

Bulk downloading is strongly discouraged. Do not download tiles unnecessarily.
In particular, downloading an area of over 250 tiles at zoom level 13 or higher for offline or later usage is forbidden. These tiles are generally not available (cached) on the server in advance, and have to be rendered specifically for those requests, putting an unjustified burden on the available resources.

I was not able to find an OSM mirror with a different offline tile usage policy, so I opted not to include OSM, and hence with this PR, will close #4.

@rudokemper rudokemper merged commit 9977f92 into main Jan 25, 2024
@rudokemper rudokemper deleted the add-support-for-other-online-sources branch January 25, 2024 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ability to fetch raster XYZ tiles from OpenStreetMap

1 participant