Skip to content

Commit

Permalink
Add test case for fill-pattern + data-driven fill-opacity
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed Nov 11, 2016
1 parent a6034b0 commit 7111a29
Show file tree
Hide file tree
Showing 4 changed files with 313 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
146 changes: 146 additions & 0 deletions render-tests/fill-opacity/property-function-pattern/style.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
{
"version": 8,
"metadata": {
"test": {
"width": 64,
"height": 64,
"ignored": {
"native": "https://github.com/mapbox/mapbox-gl-native/issues/4860"
}
}
},
"sources": {
"geojson": {
"type": "geojson",
"data": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"property": 0
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-12,
-12
],
[
-12,
12
],
[
-4,
12
],
[
-4,
-12
],
[
-12,
-12
]
]
]
}
},
{
"type": "Feature",
"properties": {
"property": 1
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-4,
-12
],
[
-4,
12
],
[
4,
12
],
[
4,
-12
],
[
-4,
-12
]
]
]
}
},
{
"type": "Feature",
"properties": {
"property": 2
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
4,
-12
],
[
4,
12
],
[
12,
12
],
[
12,
-12
],
[
4,
-12
]
]
]
}
}
]
}
}
},
"sprite": "local://sprites/emerald",
"layers": [
{
"id": "fill",
"type": "fill",
"source": "geojson",
"paint": {
"fill-antialias": false,
"fill-pattern": "generic_icon",
"fill-opacity": {
"property": "property",
"stops": [
[
0,
1
],
[
4,
0
]
]
}
}
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
{
"version": 8,
"metadata": {
"test": {
"width": 64,
"height": 64,
"ignored": {
"native": "https://github.com/mapbox/mapbox-gl-native/issues/4860"
}
}
},
"zoom": 0.1,
"sources": {
"geojson": {
"type": "geojson",
"data": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"property": 0
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-12,
-12
],
[
-12,
12
],
[
-4,
12
],
[
-4,
-12
],
[
-12,
-12
]
]
]
}
},
{
"type": "Feature",
"properties": {
"property": 1
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-4,
-12
],
[
-4,
12
],
[
4,
12
],
[
4,
-12
],
[
-4,
-12
]
]
]
}
},
{
"type": "Feature",
"properties": {
"property": 2
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
4,
-12
],
[
4,
12
],
[
12,
12
],
[
12,
-12
],
[
4,
-12
]
]
]
}
}
]
}
}
},
"sprite": "local://sprites/emerald",
"layers": [
{
"id": "fill",
"type": "fill",
"source": "geojson",
"paint": {
"fill-antialias": false,
"fill-pattern": "generic_icon",
"fill-opacity": {
"property": "property",
"stops": [
[
{
"zoom": 0,
"value": 0
},
1
],
[
{
"zoom": 0,
"value": 4
},
0
],
[
{
"zoom": 1,
"value": 0
},
0
],
[
{
"zoom": 1,
"value": 4
},
0
]
]
}
}
}
]
}

0 comments on commit 7111a29

Please sign in to comment.