tiles Property should clearly highlight if relative urls are supported or not.
Danielku15 opened this issue · 1 comments
It appears that the tiles
property is not clear enough regarding the support of relative and absolute URLs.
I lately opened a issue on mapbox-gl-js that relative URLs are not correctly handled but the bug was closed with the info that absolute URLs are needed in the tiles
property. From the current description it is not 100% clear that his is actually a requirement:
Lines 73 to 79 in 4820170
It appears that some services like ESRI ArcGIS only specify relative URLs which need to be combined with the URL where the TileJSON is hosted.
Either the spec should mention that only absolute endpoints are supported or it should clearly define how relative URLs should be handled, especially in regards to leading slashes.
Thanks so much for the ticket @Danielku15 👍 . We've added the clarification as part of the upcoming TileJSON 3.0.0 release over at #52.
The main reasoning behind requiring the url to be absolute is because it's ambiguous what a relative URL should be relative to. For example, is it the TileJSON URL, the style URL, or the page URL? What if the TileJSON is inline in the style?
Thanks again for your input.