Skip to content

Commit

Permalink
Removed baseUrl from Cesium3DTileset
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleyse committed Oct 23, 2015
1 parent 9ae609d commit 994a391
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions Source/Scene/Cesium3DTileset.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ define([
}
//>>includeEnd('debug');

var baseUrl = appendForwardSlash(url);
var url = appendForwardSlash(url);

this._url = url;
this._baseUrl = baseUrl;
this._root = undefined;
this._properties = undefined; // // Metadata for per-model/point/etc properties
this._geometricError = undefined; // Geometric error when the tree is not rendered at all
Expand Down Expand Up @@ -147,10 +146,10 @@ define([

var that = this;

loadJson(baseUrl + 'tiles.json').then(function(tree) {
loadJson(url + 'tiles.json').then(function(tree) {
that._properties = tree.properties;
that._geometricError = tree.geometricError;
that._root = new Cesium3DTile(that, baseUrl, tree.root, undefined);
that._root = new Cesium3DTile(that, url, tree.root, undefined);

var stack = [];
stack.push({
Expand All @@ -166,7 +165,7 @@ define([
var length = children.length;
for (var k = 0; k < length; ++k) {
var childHeader = children[k];
var childTile = new Cesium3DTile(that, baseUrl, childHeader, t.cesium3DTile);
var childTile = new Cesium3DTile(that, url, childHeader, t.cesium3DTile);
t.cesium3DTile.children.push(childTile);

stack.push({
Expand Down
2 changes: 1 addition & 1 deletion Source/Scene/Instanced3DModel3DTileContentProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ define([

if (gltfFormat === 0) {
var gltfUrl = getStringFromTypedArray(gltfView);
var url = (new Uri(gltfUrl).isAbsolute()) ? gltfUrl : that._tileset._baseUrl + gltfUrl;
var url = (new Uri(gltfUrl).isAbsolute()) ? gltfUrl : that._tileset.url + gltfUrl;
collectionOptions.url = url;
// TODO : how to get the correct headers
} else {
Expand Down

0 comments on commit 994a391

Please sign in to comment.