Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hpinkos committed Feb 13, 2018
1 parent 5c3e88d commit 9988116
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions Apps/CesiumViewer/CesiumViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,24 @@ define([
var loadingIndicator = document.getElementById('loadingIndicator');
var viewer;
try {
var hasBaseLayerPicker = !defined(imageryProvider);
viewer = new Viewer('cesiumContainer', {
imageryProvider : imageryProvider,
baseLayerPicker : !defined(imageryProvider),
baseLayerPicker : hasBaseLayerPicker,
scene3DOnly : endUserOptions.scene3DOnly,
requestRenderMode : true
});

viewer.terrainProvider = new CesiumTerrainProvider({
url : 'https://assets.agi.com/stk-terrain/v1/tilesets/world/tiles',
requestWaterMask : true,
requestVertexNormals : true
});
if (hasBaseLayerPicker) {
var viewModel = viewer.baseLayerPicker.viewModel;
viewModel.selectedTerrain = viewModel.terrainProviderViewModels[1];
} else {
viewer.terrainProvider = new CesiumTerrainProvider({
url: 'https://assets.agi.com/stk-terrain/v1/tilesets/world/tiles',
requestWaterMask: true,
requestVertexNormals: true
});
}
} catch (exception) {
loadingIndicator.style.display = 'none';
var message = formatError(exception);
Expand Down

0 comments on commit 9988116

Please sign in to comment.