1

I've trawled through the docs and attempted some implementations, but haven't had much luck.

My tile URLs are basically randomly generated (8EBFU43L.jpg, for example) and the URLs are fetched from another non-standard API.

There are also multiple zoom levels (between 1 and 10).

Is it possible to use OpenLayers with this setup at all?

Thanks!

1
  • See this related post Commented Mar 7, 2018 at 13:52

1 Answer 1

0

The documentation for the XYZ source shows you can pass a function that generates the URL to load a tile from:

new ol.source.XYZ({
  tileUrlFunction: function(coordinate) {
    return 'https://example.org/' + coordinate[0] + '/' + coordinate[1] + '/' + (-coordinate[2] - 1) + '.png';
  },
});

https://openlayers.org/en/latest/apidoc/module-ol_source_XYZ-XYZ.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.