Skip to content

Instantly share code, notes, and snippets.

@denverpierce
Created April 12, 2016 16:40
Show Gist options
  • Save denverpierce/72179dce5bbfd850df3c356f9df07ba6 to your computer and use it in GitHub Desktop.
Save denverpierce/72179dce5bbfd850df3c356f9df07ba6 to your computer and use it in GitHub Desktop.
var viewer = new Cesium.Viewer('cesiumContainer', {
baseLayerPicker : false
});
var usgs = new Cesium.ImageryLayer(new Cesium.WebMapTileServiceImageryProvider({
url : 'http://basemap.nationalmap.gov/arcgis/rest/services/USGSShadedReliefOnly/MapServer/WMTS',
layer : 'USGSShadedReliefOnly',
style : 'default',
format : 'image/jpeg',
tileMatrixSetID : 'default028mm',
maximumLevel : 19,
credit : new Cesium.Credit('U. S. Geological Survey')
}));
usgs.imageryProvider.readyPromise.then(function(){
viewer.imageryLayers.add(usgs);
toggle();
});
function toggle() {
setTimeout(function () {
usgs.show = !usgs.show;
toggle();
}, 500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment