-
-
Notifications
You must be signed in to change notification settings - Fork 224
[0.10.0] LayerDef.intGridValues array order is no longer relevant
Sébastien Bénard edited this page Jan 20, 2022
·
2 revisions
Starting with 0.10.x, the integer values in IntGrid layers can be re-ordered freely by users.
Please make sure your importer uses the value property to get the actual IntGrid value, and not the array index!
In the following image, value "4" is before value "3".

A typical entry in intGridValues array (in a LayerDef JSON) looks like this:
"intGridValues": [
{ "value": 1, "identifier": "a", "color": "#FF0000" },
{ "value": 2, "identifier": "b", "color": "#53FF00" },
{ "value": 4, "identifier": "d", "color": "#00FFEA" },
{ "value": 3, "identifier": "c", "color": "#0029FF" },
{ "value": 5, "identifier": "e", "color": "#FF00EA" }
]