customDataSource

Hi everyone,
I have got customDataSource with few enetities,
Is there any way how change position one of them?
Thanks
Best Regards
retepik

Hello Retepik,

You can change the position of any of the entities by simply setting the position to a new value.

ie entity.position = Cesium.Cartesian3.fromDegrees(newLongitude, newLatitude);

Have you seen this tutorial on visualizing spatial data? http://cesiumjs.org/2015/02/02/Visualizing-Spatial-Data/

There’s a lot of information on how to use the entity API in that tutorial.

Best,

Hannah

Thanks Hannah,
I understand how change position of entiy.
But I don't know how can I get a entity from my custom data source?
For example I have got one customDataSource and name of specify entity and I want change position or visibility of entity.
Thanks

Sorry for misunderstanding your question.

You can do CustomDataSource.entities to get the EntityCollection. You can use customDataSource.entities.getById(‘my entity id’) to get the entity with that id.

Does that answer your question? If not, could you paste a code sample of how you are adding entities to the custom datasource? That’ll help me better understand what you’re trying to accomplish.

Thanks,

Hannah