I've been struggling with finding a way to incorporate country data from naturalearthdata.com into a Cesium application. I get the following errors:
An error occurred while rendering. Rendering has stopped.
DeveloperError: normalized result is not a number
Error
at new DeveloperError (http://localhost:8080/Source/Core/DeveloperError.js:44:19)
at Function.Cartesian3.normalize (http://localhost:8080/Source/Core/Cartesian3.js:459:19)
at computeTriangleAttributes (http://localhost:8080/Source/Core/GeometryPipeline.js:1903:24)
at splitLongitudeTriangles (http://localhost:8080/Source/Core/GeometryPipeline.js:2060:17)
at Object.GeometryPipeline.splitLongitude (http://localhost:8080/Source/Core/GeometryPipeline.js:2484:17)
at geometryPipeline (http://localhost:8080/Source/Scene/PrimitivePipeline.js:139:38)
at Object.PrimitivePipeline.combineGeometry (http://localhost:8080/Source/Scene/PrimitivePipeline.js:282:26)
at combineGeometry (http://localhost:8080/Source/Workers/combineGeometry.js:12:41)
at http://localhost:8080/Source/Workers/createTaskProcessorWorker.js:56:42
naturalearthdata.com gives me shp, prj, shx, and dbf files. I have not found a way to visualize shapefiles on Cesium, so I have been trying to convert it to GeoJSON (mostly because of the sandcastle example) using mapshaper.com and various other websites, with no luck. I saved the json file to the same folder as the sandcastle example, and here is my very simple code:
var viewer = new Cesium.Viewer('cesiumContainer');
Sandcastle.addDefaultToolbarButton('Default styling', function() {
viewer.dataSources.add(Cesium.GeoJsonDataSource.load('../../SampleData/ne_10m_admin_0_countries2.json'));
});
I realize I'm probably missing something very basic here, but please help! How can I overlay countries with borders?