mapbox / tilejson-spec

JSON format for describing map tilesets.
255 stars 52 forks source link

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

Closed robbiet480 closed 10 years ago

robbiet480 commented 10 years ago

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 10 years ago

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.