1. A concise explanation of the problem you're experiencing.
I am working on line of sight on tyhe new york 3D tile data. I want to project color over feature which are visible to human eye and color the building which is visble and give another color which are not visble to human eye
2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
I have used 3dtileset data ,and tileload function to get an array of 3d tile and passing the content to another function where calculation is done for visibility. Here am not able to color the object building with matchin height or coordinates.
var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: ‘https://beta.cesium.com/api/assets/1461?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJkYWJmM2MzNS02OWM5LTQ3OWItYjEyYS0xZmNlODM5ZDNkMTYiLCJpZCI6NDQsImFzc2V0cyI6WzE0NjFdLCJpYXQiOjE0OTkyNjQ3NDN9.vuR75SqPDKcggvUrG_vpx0Av02jdiAxnnB1fNf-9f7s’,
shadows: true,
terrainShadows: Cesium.ShadowMode.ENABLED,
/* classificationType : Cesium.ClassificationType.TERRAIN,*/
tilesLoaded : true
}));
var tileset_data=;
tileset.tileLoad.addEventListener(function(tile) {
var content = tile.content;
//console.log(“maincontent===”);console.log(content);
//var l=0; console.log(“datacontent===”+content.getFeature(l).getProperty(‘latitude’));
for (var i = 0; i < content.featuresLength; i++) {
var feature = content.getFeature(i);
tileset_data[i]=;
tileset_data[i]['latitude']=content.getFeature(i).getProperty('latitude');
tileset_data[i]['longitude']=content.getFeature(i).getProperty('longitude');
tileset_data[i]['area']=content.getFeature(i).getProperty('area');
tileset_data[i]['height']=content.getFeature(i).getProperty('height');
tileset_data[i]['SOURCE_ID']=content.getFeature(i).getProperty('SOURCE_ID');
tileset_data[i]['name']=content.getFeature(i).getProperty('name');
}
console.log(tileset_data,content);
function LOS(tileset_data,content);
// again i tried changing color for height more than 50
for (var l = 0; l < content.featuresLength; l++) {
if(content.getFeature(l).getProperty >50){
content.getFeature(l).color=Cesium.Color.LIME;
}else{
content.getFeature(l).color = Cesium.Color.CORAL;
}
}
});
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I am working on line of sight on tyhe new york 3D tile data. I want to project color over feature which are visible to human eye and color the building which is visble and give another color which are not visble to human eye.
4. The Cesium version you're using, your operating system and browser.
1.44 cesuim, windows 10