From a9885017a8509adf9baeda573c92b15f43c1d0db Mon Sep 17 00:00:00 2001 From: Chris Loer Date: Wed, 11 Apr 2018 16:19:30 -0700 Subject: [PATCH] Test that symbols in adjacent tiles are included in query results. Tests issue #5475. --- .../symbol/tile-boundary/expected.json | 13 ++++ .../symbol/tile-boundary/style.json | 61 +++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 test/integration/query-tests/symbol/tile-boundary/expected.json create mode 100644 test/integration/query-tests/symbol/tile-boundary/style.json diff --git a/test/integration/query-tests/symbol/tile-boundary/expected.json b/test/integration/query-tests/symbol/tile-boundary/expected.json new file mode 100644 index 00000000000..3ccdfab47ea --- /dev/null +++ b/test/integration/query-tests/symbol/tile-boundary/expected.json @@ -0,0 +1,13 @@ +[ + { + "geometry": { + "type": "Point", + "coordinates": [ + 2.999267578125, + 2.9978987411030573 + ] + }, + "type": "Feature", + "properties": {} + } +] diff --git a/test/integration/query-tests/symbol/tile-boundary/style.json b/test/integration/query-tests/symbol/tile-boundary/style.json new file mode 100644 index 00000000000..fd4a5241e22 --- /dev/null +++ b/test/integration/query-tests/symbol/tile-boundary/style.json @@ -0,0 +1,61 @@ +{ + "version": 8, + "metadata": { + "test": { + "debug": true, + "height": 128, + "width": 256, + "queryGeometry": [ + [ + 0, + 0 + ], + [ + 100, + 128 + ] + ] + } + }, + "center": [ + 0, + 0 + ], + "zoom": 3, + "sources": { + "point": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + 3, + 3 + ] + } + } + ] + } + } + }, + "glyphs": "local://glyphs/{fontstack}/{range}.pbf", + "layers": [ + { + "id": "text", + "type": "symbol", + "source": "point", + "layout": { + "text-field": "This Label Bleeds Over Tile Boundaries", + "text-font": [ + "Open Sans Semibold", + "Arial Unicode MS Bold" + ] + } + } + ] +}