-
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.
Guard against non-numeric id in GeoJSON features (#4581)
* Add failing regression test for #4494 * Guard against non-numeric id in GeoJSON features Closes #4494 * Add explanatory comment * Update tests to conform to numeric-only feature.id * Add explanatory comment
- Loading branch information
1 parent
30d09af
commit a2dc4fa
Showing
6 changed files
with
93 additions
and
6 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
33 changes: 33 additions & 0 deletions
33
test/integration/query-tests/regressions/mapbox-gl-js#4494/expected.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,33 @@ | ||
[ | ||
{ | ||
"geometry": { | ||
"type": "Polygon", | ||
"coordinates": [ | ||
[ | ||
[ | ||
-10.01953125, | ||
10.012129557908139 | ||
], | ||
[ | ||
10.01953125, | ||
10.012129557908139 | ||
], | ||
[ | ||
10.01953125, | ||
-10.012129557908139 | ||
], | ||
[ | ||
-10.01953125, | ||
-10.012129557908139 | ||
], | ||
[ | ||
-10.01953125, | ||
10.012129557908139 | ||
] | ||
] | ||
] | ||
}, | ||
"type": "Feature", | ||
"properties": {} | ||
} | ||
] |
44 changes: 44 additions & 0 deletions
44
test/integration/query-tests/regressions/mapbox-gl-js#4494/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,44 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"width": 64, | ||
"height": 64, | ||
"queryGeometry": [ | ||
32, | ||
32 | ||
], | ||
"debug": true | ||
} | ||
}, | ||
"zoom": 0, | ||
"sources": { | ||
"geojson": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "Feature", | ||
"id": "foo", | ||
"properties": {}, | ||
"geometry": { | ||
"type": "Polygon", | ||
"coordinates": [ | ||
[ | ||
[ -10, 10 ], | ||
[ 10, 10 ], | ||
[ 10, -10 ], | ||
[ -10, -10 ], | ||
[ -10, 10 ] | ||
] | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "fill", | ||
"type": "fill", | ||
"source": "geojson" | ||
} | ||
] | ||
} |
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