-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test case for fill-pattern + data-driven fill-opacity
- Loading branch information
1 parent
a6034b0
commit 7111a29
Showing
4 changed files
with
313 additions
and
0 deletions.
There are no files selected for viewing
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
146
render-tests/fill-opacity/property-function-pattern/style.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
] | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} |
Binary file added
BIN
+3.76 KB
render-tests/fill-opacity/zoom-and-property-function-pattern/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
167 changes: 167 additions & 0 deletions
167
render-tests/fill-opacity/zoom-and-property-function-pattern/style.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
] | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} |