Hi there,
I tried to use GeoJsonDataSource to input GeoJson format dataset with the following link as the reference Cesium Sandcastle
Below is the sample of input method:
const geojsonlayer = await Cesium.GeoJsonDataSource.load(geojsonurl, {
clampToGround: true,
stroke: Cesium.Color.HOTPINK,
fill: Cesium.Color.PINK.withAlpha(0.5),
strokeWidth: 3,
});
const dataSource = await this.viewer.dataSources.add(geojsonlayer);
console.log(dataSource);
for (const entity of dataSource.entities.values) {
if (entity.polygon) {
entity.polygon.classificationType = Cesium.ClassificationType.BOTH;
// entity.polygon.material = Cesium.Color(255, 0, 0, 0.5);
console.log(entity.polygon);
}
if (entity.polyline) {
console.log(entity.polyline);
entity.polyline.classificationType = Cesium.ClassificationType.BOTH;
}
}
We are expecting the result as below,
But this is how is it shows in reality,
Do we have anything missed in the setting please?