Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow a secondary/backup tileserver url #15634

Open
thibaultmol opened this issue Mar 12, 2024 · 3 comments
Open

Allow a secondary/backup tileserver url #15634

thibaultmol opened this issue Mar 12, 2024 · 3 comments

Comments

@thibaultmol
Copy link

Is your feature request related to a problem? Please describe.
It would be nice if you could specify a secondary url in case the primary tile server url doesn't work.

Describe the solution you'd like
have another parameter in the embed code to specify a second tile server if the first tileserver fails

Sorry if this is already in Openlayers, but I couldn't find it

@ahocevar
Copy link
Member

You can specify a tileLoadFunction and handle error handling and fallback to a different server there. See https://openlayers.org/en/latest/apidoc/module-ol_Tile.html#~LoadFunction.

@thibaultmol
Copy link
Author

Maybe it'd be good to have example of implementing a secondary tile server in the docs?

@ahocevar
Copy link
Member

@thibaultmol If you want to create a pull request with such an example, it would be welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants