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

tiles Property should clearly highlight if relative urls are supported or not. #51

Closed
Danielku15 opened this issue Jul 28, 2018 · 1 comment
Labels

Comments

@Danielku15
Copy link

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:

// REQUIRED. An array of tile endpoints. {z}, {x} and {y}, if present,
// are replaced with the corresponding integers. If multiple endpoints are specified, clients
// may use any combination of endpoints. All endpoints MUST return the same
// content for the same URL. The array MUST contain at least one endpoint.
"tiles": [
"http://localhost:8888/admin/1.0.0/world-light,broadband/{z}/{x}/{y}.png"
],

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.

@mapsam mapsam added the v3 label Jul 30, 2018
@mapsam mapsam mentioned this issue Jul 30, 2018
41 tasks
@GretaCB
Copy link
Contributor

GretaCB commented Jul 30, 2018

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.

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

No branches or pull requests

3 participants