-
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.
Don't load FeatureIndex#vtLayers from outside FeatureIndex code. (#6559) * Don't load FeatureIndex#vtLayers from outside FeatureIndex code. Fixes issue #6555 (a possible crash when calling queryRenderedFeatures after querySourceFeatures) The actual contents of the regression test are not that important -- before this fix, the test would crash. * Fix Tile unit test by deserializing the FeatureIndex before using it.
- Loading branch information
Showing
5 changed files
with
88 additions
and
18 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
13 changes: 13 additions & 0 deletions
13
test/integration/query-tests/regressions/mapbox-gl-js#6555/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,13 @@ | ||
[ | ||
{ | ||
"geometry": { | ||
"type": "Point", | ||
"coordinates": [ | ||
0, | ||
0 | ||
] | ||
}, | ||
"type": "Feature", | ||
"properties": {} | ||
} | ||
] |
59 changes: 59 additions & 0 deletions
59
test/integration/query-tests/regressions/mapbox-gl-js#6555/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,59 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"width": 128, | ||
"height": 128, | ||
"operations": [ | ||
[ | ||
"querySourceFeatures", | ||
[ | ||
"source" | ||
] | ||
] | ||
], | ||
"queryGeometry": [ | ||
79, | ||
64 | ||
], | ||
"queryOptions": { | ||
} | ||
} | ||
}, | ||
"zoom": 0, | ||
"glyphs": "local://glyphs/{fontstack}/{range}.pbf", | ||
"sprite": "local://sprites/sprite", | ||
"sources": { | ||
"source": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "FeatureCollection", | ||
"features": [{ | ||
"type": "Feature", | ||
"geometry": { | ||
"type": "Point", | ||
"coordinates": [0, 0] | ||
} | ||
}] | ||
} | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "background", | ||
"type": "background", | ||
"paint": { | ||
"background-color": "white" | ||
} | ||
}, | ||
{ | ||
"id": "iconlayer", | ||
"type": "symbol", | ||
"source": "source", | ||
"layout": { | ||
"icon-image": "building-12", | ||
"icon-offset": [15, 0] | ||
} | ||
} | ||
] | ||
} |
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