Rendering polygons from a GeoJSON

1. A concise explanation of the problem you’re experiencing.

I am trying to render multiple polygons from a GeoJSON and fill them blue. I followed the example from the link below. The polygons render, but the “fill” is not applied and they are empty inside. It only shows the border.

Example I tried to replicate:

https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=GeoJSON%20and%20TopoJSON.html

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

My sample code:

SandCastle

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

I get a GeoJSON from a rest service with about 20 polygons. I need to shade them to show different regions on the globe to visualize rainfall data.

4. The Cesium version you’re using, your operating system and browser.

1.50.0, Windows 10, Chrome

Thank you for your help

Your GeoJSON has the wrong geometry type, MultiLineString vs Polygon.

Thanks Scott. That fixes it when I render a single polygon. However when I have multiple polygons, then only one of them is shaded. Do you know what is the best way to fix that? I put an example below.

SandCastle Example.

Thanks

The MultiPolygon is poorly formed (missing braces around each line string that makes a single polyline. Sandcastle.

Thanks Scott. That fixed the problem I was having.