-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix within usage with othere expressions in the same filter * Add render tests * Fix filter operator checking for nested condition
- Loading branch information
Showing
5 changed files
with
124 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+393 Bytes
test/integration/render-tests/within/within-in-complex-filter/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
102 changes: 102 additions & 0 deletions
102
test/integration/render-tests/within/within-in-complex-filter/style.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"width": 64, | ||
"height": 64 | ||
} | ||
}, | ||
"zoom": 3, | ||
"center": [2.5, 2.5], | ||
"sources": { | ||
"points": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"number": [5] | ||
}, | ||
"geometry": { | ||
"type": "Point", | ||
"coordinates": [ | ||
1.9775390625, | ||
2.3284603685731593 | ||
] | ||
} | ||
}, | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"number": [5] | ||
}, | ||
"geometry": { | ||
"type": "Point", | ||
"coordinates": [ | ||
1.7138671875, | ||
-1.7136116598836224 | ||
] | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"polygon": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": {}, | ||
"geometry": { | ||
"type": "Polygon", | ||
"coordinates": [ | ||
[[0, 0], | ||
[0, 5], | ||
[5, 5], | ||
[5, 0], | ||
[0, 0]] | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "border", | ||
"type": "fill", | ||
"source": "polygon", | ||
"paint": { | ||
"fill-color": "black", | ||
"fill-opacity": 0.5 | ||
} | ||
}, | ||
{ | ||
"id": "circle", | ||
"type": "circle", | ||
"source": "points", | ||
"filter": ["all", ["in", 5, ["get", "number"]], ["==", ["within", { | ||
"type": "Polygon", | ||
"coordinates": [ | ||
[ | ||
[0, 0], | ||
[0, 5], | ||
[5, 5], | ||
[5, 0], | ||
[0, 0] | ||
] | ||
] | ||
}], true] | ||
], | ||
"paint": { | ||
"circle-radius": 5, | ||
"circle-color": "red" | ||
} | ||
} | ||
] | ||
} |