Skip to content

Commit

Permalink
Fix qRF for several layers per bucket (internal-2047)
Browse files Browse the repository at this point in the history
  • Loading branch information
underoot committed Dec 9, 2024
1 parent f87d3ff commit 8ea0639
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/data/feature_index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class FeatureIndex {
for (let l = 0; l < layerIDs.length; l++) {
const layerId = layerIDs[l];

if (!queryLayers[layerId]) return;
if (!queryLayers[layerId]) continue;
const {styleLayer, targets} = queryLayers[layerId];

let featureState: FeatureState = {};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[
{
"geometry": {
"type": "Point",
"coordinates": [
0,
0
]
},
"type": "Feature",
"properties": {
"key": "value"
},
"source": "geojson",
"state": {}
}
]
46 changes: 46 additions & 0 deletions test/integration/query-tests/options/layers-not-first/style.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"version": 8,
"metadata": {
"test": {
"width": 64,
"height": 64,
"queryGeometry": [
32,
32
],
"queryOptions": {
"layers": ["b"]
}
}
},
"sources": {
"geojson": {
"type": "geojson",
"data": {
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0,
0
]
},
"properties": {
"key": "value"
}
}
}
},
"layers": [
{
"id": "a",
"type": "circle",
"source": "geojson"
},
{
"id": "b",
"type": "circle",
"source": "geojson"
}
]
}

0 comments on commit 8ea0639

Please sign in to comment.