diff --git a/test/integration/render-tests/line-dasharray/function--line-width-composite-function/expected.png b/test/integration/render-tests/line-dasharray/function--line-width-composite-function/expected.png index 4b3fafe0166..df664e24be2 100644 Binary files a/test/integration/render-tests/line-dasharray/function--line-width-composite-function/expected.png and b/test/integration/render-tests/line-dasharray/function--line-width-composite-function/expected.png differ diff --git a/test/integration/render-tests/line-dasharray/function--line-width-composite-function/style.json b/test/integration/render-tests/line-dasharray/function--line-width-composite-function/style.json index 3ea4c0648b2..a2ebd810390 100644 --- a/test/integration/render-tests/line-dasharray/function--line-width-composite-function/style.json +++ b/test/integration/render-tests/line-dasharray/function--line-width-composite-function/style.json @@ -2,144 +2,146 @@ "version": 8, "metadata": { "test": { - "height": 256, - "ignored":{ - "native": "https://github.com/mapbox/mapbox-gl-js/issues/3682#issuecomment-264348200" - } + "width": 64, + "height": 64 } }, - "center": [ - 13.418056, - 52.499167 - ], - "zoom": 14, + "zoom": 0.5, "sources": { - "mapbox": { - "type": "vector", - "maxzoom": 14, - "tiles": [ - "local://tiles/{z}-{x}-{y}.mvt" - ] + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 1 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + -5 + ], + [ + 10, + -5 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 3 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 5 + ], + [ + 10, + 5 + ] + ] + } + } + ] + } } }, "layers": [ - { - "id": "background", - "type": "background", - "paint": { - "background-color": "white" - } - }, { "id": "road", "type": "line", - "source": "mapbox", - "source-layer": "road", + "source": "geojson", "paint": { "line-width": { - "property": "class", + "property": "property", "type": "categorical", "stops": [ [ { - "zoom": 13, - "value": "path" + "zoom": 0, + "value": 1 }, 1 ], [ { - "zoom": 13, - "value": "driveway" + "zoom": 0, + "value": 2 }, 2 ], [ { - "zoom": 13, - "value": "service" + "zoom": 0, + "value": 3 }, 3 ], [ { - "zoom": 13, - "value": "street_limited" + "zoom": 1, + "value": 1 }, 4 ], [ { - "zoom": 13, - "value": "street" + "zoom": 1, + "value": 2 }, 5 ], [ { - "zoom": 13, - "value": "main" + "zoom": 1, + "value": 3 }, 6 - ], - [ - { - "zoom": 15, - "value": "path" - }, - 4 - ], - [ - { - "zoom": 15, - "value": "driveway" - }, - 8 - ], - [ - { - "zoom": 15, - "value": "service" - }, - 12 - ], - [ - { - "zoom": 15, - "value": "street_limited" - }, - 16 - ], - [ - { - "zoom": 15, - "value": "street" - }, - 20 - ], - [ - { - "zoom": 15, - "value": "main" - }, - 24 ] ] }, "line-dasharray": { "stops": [ [ - 13, + 0, [ 1, 1 ] ], [ - 15, + 1, [ 2, - 2 + 1 ] ] ] diff --git a/test/integration/render-tests/line-dasharray/function--line-width-property-function/expected.png b/test/integration/render-tests/line-dasharray/function--line-width-property-function/expected.png index 82ee2cd81d0..9dc6a1ddb7e 100644 Binary files a/test/integration/render-tests/line-dasharray/function--line-width-property-function/expected.png and b/test/integration/render-tests/line-dasharray/function--line-width-property-function/expected.png differ diff --git a/test/integration/render-tests/line-dasharray/function--line-width-property-function/style.json b/test/integration/render-tests/line-dasharray/function--line-width-property-function/style.json index d38480e041b..043ad25c275 100644 --- a/test/integration/render-tests/line-dasharray/function--line-width-property-function/style.json +++ b/test/integration/render-tests/line-dasharray/function--line-width-property-function/style.json @@ -2,84 +2,102 @@ "version": 8, "metadata": { "test": { - "height": 256, - "ignored":{ - "native": "https://github.com/mapbox/mapbox-gl-js/issues/3682#issuecomment-264348200" - } + "width": 64, + "height": 64 } }, - "center": [ - 13.418056, - 52.499167 - ], - "zoom": 14, + "zoom": 0.5, "sources": { - "mapbox": { - "type": "vector", - "maxzoom": 14, - "tiles": [ - "local://tiles/{z}-{x}-{y}.mvt" - ] + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 1 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + -5 + ], + [ + 10, + -5 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 3 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 5 + ], + [ + 10, + 5 + ] + ] + } + } + ] + } } }, "layers": [ - { - "id": "background", - "type": "background", - "paint": { - "background-color": "white" - } - }, { "id": "road", "type": "line", - "source": "mapbox", - "source-layer": "road", + "source": "geojson", "paint": { "line-width": { - "property": "class", - "type": "categorical", - "stops": [ - [ - "path", - 1 - ], - [ - "driveway", - 2 - ], - [ - "service", - 3 - ], - [ - "street_limited", - 4 - ], - [ - "street", - 5 - ], - [ - "main", - 6 - ] - ] + "type": "identity", + "property": "property" }, "line-dasharray": { "stops": [ [ - 13, + 0, [ 1, 1 ] ], [ - 15, + 1, [ 2, - 2 + 1 ] ] ] diff --git a/test/integration/render-tests/line-dasharray/literal--line-width-composite-function/expected.png b/test/integration/render-tests/line-dasharray/literal--line-width-composite-function/expected.png index 530b734b528..181d4ed3712 100644 Binary files a/test/integration/render-tests/line-dasharray/literal--line-width-composite-function/expected.png and b/test/integration/render-tests/line-dasharray/literal--line-width-composite-function/expected.png differ diff --git a/test/integration/render-tests/line-dasharray/literal--line-width-composite-function/style.json b/test/integration/render-tests/line-dasharray/literal--line-width-composite-function/style.json index fe55e10d096..21da53ec11f 100644 --- a/test/integration/render-tests/line-dasharray/literal--line-width-composite-function/style.json +++ b/test/integration/render-tests/line-dasharray/literal--line-width-composite-function/style.json @@ -2,132 +2,134 @@ "version": 8, "metadata": { "test": { - "height": 256, - "ignored":{ - "native": "https://github.com/mapbox/mapbox-gl-js/issues/3682#issuecomment-264348200" - } + "width": 64, + "height": 64 } }, - "center": [ - 13.418056, - 52.499167 - ], - "zoom": 14, + "zoom": 0.5, "sources": { - "mapbox": { - "type": "vector", - "maxzoom": 14, - "tiles": [ - "local://tiles/{z}-{x}-{y}.mvt" - ] + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 1 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + -5 + ], + [ + 10, + -5 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 3 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 5 + ], + [ + 10, + 5 + ] + ] + } + } + ] + } } }, "layers": [ - { - "id": "background", - "type": "background", - "paint": { - "background-color": "white" - } - }, { "id": "road", "type": "line", - "source": "mapbox", - "source-layer": "road", + "source": "geojson", "paint": { "line-width": { - "property": "class", + "property": "property", "type": "categorical", "stops": [ [ { - "zoom": 13, - "value": "path" + "zoom": 0, + "value": 1 }, 1 ], [ { - "zoom": 13, - "value": "driveway" + "zoom": 0, + "value": 2 }, 2 ], [ { - "zoom": 13, - "value": "service" + "zoom": 0, + "value": 3 }, 3 ], [ { - "zoom": 13, - "value": "street_limited" + "zoom": 1, + "value": 1 }, 4 ], [ { - "zoom": 13, - "value": "street" + "zoom": 1, + "value": 2 }, 5 ], [ { - "zoom": 13, - "value": "main" + "zoom": 1, + "value": 3 }, 6 - ], - [ - { - "zoom": 15, - "value": "path" - }, - 4 - ], - [ - { - "zoom": 15, - "value": "driveway" - }, - 8 - ], - [ - { - "zoom": 15, - "value": "service" - }, - 12 - ], - [ - { - "zoom": 15, - "value": "street_limited" - }, - 16 - ], - [ - { - "zoom": 15, - "value": "street" - }, - 20 - ], - [ - { - "zoom": 15, - "value": "main" - }, - 24 ] ] }, "line-dasharray": [ - 1, + 2, 1 ] } diff --git a/test/integration/render-tests/line-dasharray/literal--line-width-property-function/expected.png b/test/integration/render-tests/line-dasharray/literal--line-width-property-function/expected.png index dc68082d664..d396180c3ea 100644 Binary files a/test/integration/render-tests/line-dasharray/literal--line-width-property-function/expected.png and b/test/integration/render-tests/line-dasharray/literal--line-width-property-function/expected.png differ diff --git a/test/integration/render-tests/line-dasharray/literal--line-width-property-function/style.json b/test/integration/render-tests/line-dasharray/literal--line-width-property-function/style.json index 157764dfb11..dafc933f524 100644 --- a/test/integration/render-tests/line-dasharray/literal--line-width-property-function/style.json +++ b/test/integration/render-tests/line-dasharray/literal--line-width-property-function/style.json @@ -2,72 +2,90 @@ "version": 8, "metadata": { "test": { - "height": 256, - "ignored":{ - "native": "https://github.com/mapbox/mapbox-gl-js/issues/3682#issuecomment-264348200" - } + "width": 64, + "height": 64 } }, - "center": [ - 13.418056, - 52.499167 - ], - "zoom": 14, + "zoom": 0.5, "sources": { - "mapbox": { - "type": "vector", - "maxzoom": 14, - "tiles": [ - "local://tiles/{z}-{x}-{y}.mvt" - ] + "geojson": { + "type": "geojson", + "data": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "property": 1 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + -5 + ], + [ + 10, + -5 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 2 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 0 + ], + [ + 10, + 0 + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "property": 3 + }, + "geometry": { + "type": "LineString", + "coordinates": [ + [ + -10, + 5 + ], + [ + 10, + 5 + ] + ] + } + } + ] + } } }, "layers": [ - { - "id": "background", - "type": "background", - "paint": { - "background-color": "white" - } - }, { "id": "road", "type": "line", - "source": "mapbox", - "source-layer": "road", + "source": "geojson", "paint": { "line-width": { - "property": "class", - "type": "categorical", - "stops": [ - [ - "path", - 1 - ], - [ - "driveway", - 2 - ], - [ - "service", - 3 - ], - [ - "street_limited", - 4 - ], - [ - "street", - 5 - ], - [ - "main", - 6 - ] - ] + "type": "identity", + "property": "property" }, "line-dasharray": [ - 1, + 2, 1 ] }