Hello again..
I cant find how to now the number of ie: points there are stored in a datasource when read from a geoJson file, so I canie: iterarte and label them....
How can I access this property?
Thank you
After loading GeoJSON into a GeoJsonDataSource, you can get the data source’s DynamicObjectCollection, and from there you can access each of the individual DynamicObjects:
var dataSource = new Cesium.GeoJsonDataSource();
dataSource.loadUrl(’/Nevada.geojson’).then(function() {
viewer.dataSources.add(dataSource);
var dynamicObjectCollection = dataSource.getDynamicObjectCollection();
var objects = dynamicObjectCollection.getObjects();
for (var i = 0; i < objects.length; ++i) {
console.log(objects[i].id);
}
});