diff --git a/src/data/feature_index.js b/src/data/feature_index.js index e9c3cca4da6..f53bfbde875 100644 --- a/src/data/feature_index.js +++ b/src/data/feature_index.js @@ -122,7 +122,7 @@ class FeatureIndex { this.filterMatching(result, matching, this.featureIndexArray, queryGeometry, filter, params.layers, styleLayers, args.bearing, pixelsToTileUnits); const matchingSymbols = args.collisionIndex ? - args.collisionIndex.queryRenderedSymbols(queryGeometry, this.tileID, EXTENT / args.tileSize, args.collisionBoxArray, args.sourceID, args.bucketInstanceIds) : + args.collisionIndex.queryRenderedSymbols(queryGeometry, this.tileID, args.tileSize / EXTENT, args.collisionBoxArray, args.sourceID, args.bucketInstanceIds) : []; matchingSymbols.sort(); this.filterMatching(result, matchingSymbols, args.collisionBoxArray, queryGeometry, filter, params.layers, styleLayers, args.bearing, pixelsToTileUnits); diff --git a/test/integration/query-tests/regressions/mapbox-gl-js#6075/expected.json b/test/integration/query-tests/regressions/mapbox-gl-js#6075/expected.json new file mode 100644 index 00000000000..53899d62357 --- /dev/null +++ b/test/integration/query-tests/regressions/mapbox-gl-js#6075/expected.json @@ -0,0 +1,13 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, + "type": "Feature", + "properties": {} + } +] diff --git a/test/integration/query-tests/regressions/mapbox-gl-js#6075/style.json b/test/integration/query-tests/regressions/mapbox-gl-js#6075/style.json new file mode 100644 index 00000000000..6dbcc82d428 --- /dev/null +++ b/test/integration/query-tests/regressions/mapbox-gl-js#6075/style.json @@ -0,0 +1,51 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128, + "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] + } + } + ] +}