mapbox/tilejson-spec

Allow {s} in tile urls, and a subdomains array or string

robbiet480 opened this issue · 1 comments

I recently added subdomain support to leaflet-tilejson (kartena/leaflet-tilejson#10) for subdomains, as it is hard to implement subdomains with TileJSON in Leaflet. I would like to recommend officially adding {s} as a valid variable in tiles, and an associated subdomains property, which can be provided as an Array or a string, just like Leaflet supports.

tmcw commented

We discussed this and decided not to. It's ending up to be the right decision, since the subdomain hack is fading in importance now that browsers suck less: in the future, there will be one URL always in the host argument.

It's also equivalent to provide multiple domains, versus the {s} hack, if you don't consider Leaflet, and if you consider OpenLayers, the former is more convenient. TileJSON is specifically not a Leaflet configuration language and has other consumers which work very well already - such that a breaking change like this for a single consumer would not be a good move.