Select to view content in your preferred language

Optimization geojson loading with Cesium

862
1
06-20-2022 11:21 PM
SilpaRaj
New Contributor
 

I am trying to build an application that shows a globe with country borders along with US state boundaries. For US state boundaries, I follow https://eric.clst.org/tech/usgeojson/ and World country boundaries from https://hub.arcgis.com/datasets/esri::world-countries/explore?location=46.701655%2C-92.188198%2C7.07

Using Cesium to load the map and it is taking more than a minute to plot the same. Any idea to optimize the same.

Tried converting the geojson file to topojson. Also used the https://github.com/node-geojson/geojson-pick to pick the specific key from the geojson file. Both are not giving proper solution.

Code snippet to load the map is given below

 this.viewer.dataSources.add(Cesium.GeoJsonDataSource.load(--path--,{
        stroke: Cesium.Color.SILVER,
        strokeWidth: 1,
        fill: new Cesium.Color(0, 0, 0, 0)
      }));
Tags (2)
0 Kudos
1 Reply
ThinotBenit
New Contributor

June 2024, is there a solution for this?

0 Kudos