Adding coordinates in an external file


I am totally new to the great and awesome Cesium library! I have been going through the tutorials, like the HelloWorld, and testing all the new options and functions and came across a question.

My question is: is it possible to add the coordinates of a polygon, that are stored in a separate .txt or .csv file, to the Cesium code instead of adding the coordinates directly to the code?

Thank in advance

We don’t have any txt or csv handling by default (though having csv support would probably be a good idea). However it’s straightforward to read this data in JavaScript and use the Entity API to load it into Cesium. I would recommend you check out the Visualizing Spatial Data tutorial.

We also have native support GeoJSON/TopoJSON/KML and our own CZML, so if you have data in any of those formats you can load them directly as well. Check out the Sandcastle examples to see it in action.