1. A concise explanation of the problem you’re experiencing.
By going through an example in sandcastle, I’ve isolated code to add a material to terrain that adds contours. However, when using it locally with my cesium tiles, the controus come up to the tiles and stop. Basically, everything has contour lines except the thing that needs them, the tile set. I don’t imagine anything’s wrong with Cesium, I just can’t figure the right configuration. Been working on this for a week.
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
On my local machine:
var Cesium = require(‘cesium/Cesium’);
require(‘cesium/Widgets/widgets.css’);
var viewer = new Cesium.Viewer(‘cesiumContainer’, {
terrainProvider: Cesium.createWorldTerrain({
requestVertexNormals: true //Needed to visualize slope
})
});
var tileset = new Cesium.Cesium3DTileset({
url: “http://localhost:8080/src/data/cesium”
});
viewer.scene.primitives.add(tileset);
viewer.zoomTo(tileset);
var contourColor = Cesium.Color.RED.clone();
var contourUniforms = {};
var globe = viewer.scene.globe;
var material;
material = Cesium.Material.fromType(‘ElevationContour’);
contourUniforms = material.uniforms;
contourUniforms.width = 2.0;
contourUniforms.spacing = 5.0;
contourUniforms.color = contourColor;
globe.material = material;
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
Working on displaying 3d products for our customers in browser with cesium. We’re a photogrammetry company.
4. The Cesium version you’re using, your operating system and browser.
Cesium 1.43
Ubuntu 16.04