Skip to content

Geojson polygon style not working correctly #6317

Answered by nf-s
mappinggnome asked this question in General
Discussion options

You must be logged in to vote

Hi @mappinggnome

We have just changed how GeoJson styling works. So your example code should work now.

The style parameter you are using now only works with Cesium primitives (equivalent to forceCesiumPrimitives = true)

If you want to use protomaps/mvt renderer you have to use the TableStyle properties.

For example

{
  "type": "geojson",
  "name": "Test geojson using table style",
  "url": "http://ci.terria.io/main/build/TerriaJS/test/GeoJSON/height.geojson"
  "styles": [
    {
      "id": "User Style",
      "color": { "nullColor": "rgba(255,0,0,1)" },
      "outline": { "null": { "color": "rgba(249,0,0,1)" } },
      "hidden": false
    }
  ],
  "activeStyle": "User Style"
}

The TableStyle

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mappinggnome
Comment options

@nf-s
Comment options

Answer selected by mappinggnome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #6293 on June 05, 2022 05:52.