From 58a9ec30926e7be992560cca733b4fc270c11732 Mon Sep 17 00:00:00 2001 From: Mike Morris Date: Fri, 18 Jul 2014 17:58:17 -0400 Subject: [PATCH] add stop zoom/value fixture --- .../style_parser/stop-zoom-value.info.json | 7 +++ .../style_parser/stop-zoom-value.style.json | 45 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 test/fixtures/style_parser/stop-zoom-value.info.json create mode 100644 test/fixtures/style_parser/stop-zoom-value.style.json diff --git a/test/fixtures/style_parser/stop-zoom-value.info.json b/test/fixtures/style_parser/stop-zoom-value.info.json new file mode 100644 index 000000000..deaba65e2 --- /dev/null +++ b/test/fixtures/style_parser/stop-zoom-value.info.json @@ -0,0 +1,7 @@ +{ + "default": { + "log": [ + [1, "WARNING", "ParseStyle", "stop must have zoom level and value specification"] + ] + } +} diff --git a/test/fixtures/style_parser/stop-zoom-value.style.json b/test/fixtures/style_parser/stop-zoom-value.style.json new file mode 100644 index 000000000..87e674d52 --- /dev/null +++ b/test/fixtures/style_parser/stop-zoom-value.style.json @@ -0,0 +1,45 @@ +{ + "version": 3, + "sources": { + "mapbox": { + "type": "vector", + "url": "mapbox://mapbox.mapbox-terrain-v1,mapbox.mapbox-streets-v5", + "maxZoom": 14 + } + }, + "layers": [{ + "id": "landcover_grass", + "source": "mapbox", + "source-layer": "landcover", + "filter": { "class": "grass" }, + "type": "fill", + "style": { + "fill-opacity": { + "stops": [] + } + } + }, { + "id": "landcover_scrub", + "source": "mapbox", + "source-layer": "landcover", + "filter": { "class": "scrub" }, + "type": "fill", + "style": { + "fill-opacity": { + "stops": [[12]] + } + } + }, { + "id": "landcover_wood", + "source": "mapbox", + "source-layer": "landcover", + "filter": { "class": "wood" }, + "type": "fill", + "style": { + "fill-color": "@wood", + "fill-opacity": { + "stops": [[12, 1], [13, 0.8], [16, 0.2]] + } + } + }] +}