42 lines
1017 B
JSON
42 lines
1017 B
JSON
{
|
|
"expression": {
|
|
"type": "interval",
|
|
"property": "p",
|
|
"stops": [[0, "0"], [1, "1"]]
|
|
},
|
|
"propertySpec": {
|
|
"type": "string",
|
|
"property-type": "data-driven",
|
|
"expression": {"interpolated": true, "parameters": ["zoom", "feature"]}
|
|
},
|
|
"inputs": [
|
|
[{}, {"properties": {}}],
|
|
[{}, {"properties": {"p": -1}}],
|
|
[{}, {"properties": {"p": 0}}],
|
|
[{}, {"properties": {"p": 0.5}}],
|
|
[{}, {"properties": {"p": 1}}],
|
|
[{}, {"properties": {"p": 2}}],
|
|
[{}, {"properties": {"p": "0"}}]
|
|
],
|
|
"expected": {
|
|
"compiled": {
|
|
"result": "success",
|
|
"isFeatureConstant": false,
|
|
"isZoomConstant": true,
|
|
"type": "string"
|
|
},
|
|
"outputs": [
|
|
{"error": "Expected value to be of type number, but found null instead."},
|
|
"0",
|
|
"0",
|
|
"0",
|
|
"1",
|
|
"1",
|
|
{
|
|
"error": "Expected value to be of type number, but found string instead."
|
|
}
|
|
],
|
|
"serialized": ["step", ["number", ["get", "p"]], "0", 1, "1"]
|
|
}
|
|
}
|