diff --git a/lib/torque/provider/tilejson.js b/lib/torque/provider/tilejson.js index 457f492..93c3467 100644 --- a/lib/torque/provider/tilejson.js +++ b/lib/torque/provider/tilejson.js @@ -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); } });