From 3087f192285a0daa9601567e9c04072007221e4c Mon Sep 17 00:00:00 2001 From: Chris Loer Date: Fri, 17 Nov 2017 14:14:41 -0800 Subject: [PATCH] Regression test for issue #5172. Creates two layers that both include a feature from the same source. Filter query results to just one of the layers. --- .../mapbox-gl-js#5172/expected.json | 13 ++++ .../regressions/mapbox-gl-js#5172/style.json | 70 +++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 test/integration/query-tests/regressions/mapbox-gl-js#5172/expected.json create mode 100644 test/integration/query-tests/regressions/mapbox-gl-js#5172/style.json diff --git a/test/integration/query-tests/regressions/mapbox-gl-js#5172/expected.json b/test/integration/query-tests/regressions/mapbox-gl-js#5172/expected.json new file mode 100644 index 00000000000..53899d62357 --- /dev/null +++ b/test/integration/query-tests/regressions/mapbox-gl-js#5172/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#5172/style.json b/test/integration/query-tests/regressions/mapbox-gl-js#5172/style.json new file mode 100644 index 00000000000..065210cba80 --- /dev/null +++ b/test/integration/query-tests/regressions/mapbox-gl-js#5172/style.json @@ -0,0 +1,70 @@ +{ + "version": 8, + "metadata": { + "test": { + "width": 128, + "height": 128, + "queryGeometry": [ + 64, + 64 + ], + "queryOptions": { + "layers": ["iconlayer"] + } + } + }, + "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-allow-overlap": true + } + }, + { + "id": "textlayer", + "type": "symbol", + "source": "source", + "layout": { + "text-field": "ABC", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ], + "text-size": 24, + "text-offset": [0, 0] + }, + "paint": { + "text-color": "green" + } + } + ] +}