supports relative tile urls
This commit is contained in:
parent
e4aa398f6e
commit
b212913530
@ -254,9 +254,7 @@
|
||||
.replace('{y}', coord.y)
|
||||
.replace('{z}', zoom)
|
||||
.replace('{s}', subdomains[index])
|
||||
|
||||
var extra = this._extraParams();
|
||||
torque.net.get( url + (extra ? "?" + extra: ''), function (data) {
|
||||
torque.net.get( url , function (data) {
|
||||
if (data && data.responseText) {
|
||||
var rows = JSON.parse(data.responseText);
|
||||
callback(self.proccessTile(rows, coord, zoom));
|
||||
@ -327,6 +325,9 @@
|
||||
self.options[k] = data[k];
|
||||
}
|
||||
self.templateUrl = data.tiles[0];
|
||||
if (self.templateUrl.indexOf("http") !== 0){
|
||||
self.templateUrl = self.options.tileJSON.substring(0, self.options.tileJSON.lastIndexOf("/") + 1) + self.templateUrl;
|
||||
}
|
||||
self._setReady(true);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user