Fix URL template host rotation

It was sending all tiles at a given zoom to the same host.
This commit is contained in:
John Firebaugh
2013-05-28 18:46:15 -07:00
parent 9fcea83872
commit fe38a47a3c

View File

@@ -15,7 +15,7 @@ iD.BackgroundSource.template = function(data) {
return data.template
.replace('{t}', data.subdomains ?
data.subdomains[coord[2] % data.subdomains.length] : '')
data.subdomains[(coord[0] + coord[1]) % data.subdomains.length] : '')
.replace('{u}', u)
.replace('{x}', coord[0])
.replace('{y}', coord[1])