forked from mapbox/mapbox-gl-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
skip pattern layer when pattern is missing
No error or warning is printed for missing patterns. fix mapbox#4660
- Loading branch information
Showing
10 changed files
with
160 additions
and
1 deletion.
There are no files selected for viewing
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
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
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
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
Binary file added
BIN
+108 Bytes
test/integration/render-tests/background-pattern/missing/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions
20
test/integration/render-tests/background-pattern/missing/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,20 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"width": 64, | ||
"height": 64 | ||
} | ||
}, | ||
"sources": {}, | ||
"sprite": "local://sprites/emerald", | ||
"layers": [ | ||
{ | ||
"id": "background", | ||
"type": "background", | ||
"paint": { | ||
"background-pattern": "missing" | ||
} | ||
} | ||
] | ||
} |
Binary file added
BIN
+600 Bytes
test/integration/render-tests/fill-extrusion-pattern/missing/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions
68
test/integration/render-tests/fill-extrusion-pattern/missing/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,68 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"height": 256, | ||
"ignored": { | ||
"js": "https://github.com/mapbox/mapbox-gl-js/issues/3327", | ||
"native": "https://github.com/mapbox/mapbox-gl-js/issues/3327" | ||
} | ||
} | ||
}, | ||
"sources": { | ||
"geojson": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"property": 20 | ||
}, | ||
"geometry": { | ||
"type": "Polygon", | ||
"coordinates": [ | ||
[ [ -0.0004, 0 ], | ||
[ -0.0002, 0.0002 ], | ||
[ 0.0000, 0 ], | ||
[ -0.0002, -0.0002 ], | ||
[ -0.0004, 0 ] ] | ||
] | ||
} | ||
}, | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"property": 20 | ||
}, | ||
"geometry": { | ||
"type": "Polygon", | ||
"coordinates": [ | ||
[ [ -0.0000, -0.0002 ], | ||
[ -0.0000, 0.0002 ], | ||
[ 0.0003, 0.0002 ], | ||
[ 0.0003, -0.0002 ], | ||
[ -0.0000, -0.0002 ] ] | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"sprite": "local://sprites/emerald", | ||
"pitch": 60, | ||
"zoom": 18, | ||
"layers": [ | ||
{ | ||
"id": "extrusion", | ||
"type": "fill-extrusion", | ||
"source": "geojson", | ||
"paint": { | ||
"fill-extrusion-pattern": "missing", | ||
"fill-extrusion-height": 10 | ||
} | ||
} | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions
53
test/integration/render-tests/fill-pattern/missing/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,53 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"width": 64, | ||
"height": 64 | ||
} | ||
}, | ||
"sources": { | ||
"geojson": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "Polygon", | ||
"coordinates": [ | ||
[ | ||
[ | ||
-10, | ||
-10 | ||
], | ||
[ | ||
-10, | ||
10 | ||
], | ||
[ | ||
10, | ||
10 | ||
], | ||
[ | ||
10, | ||
-10 | ||
], | ||
[ | ||
-10, | ||
-10 | ||
] | ||
] | ||
] | ||
} | ||
} | ||
}, | ||
"sprite": "local://sprites/emerald", | ||
"layers": [ | ||
{ | ||
"id": "fill", | ||
"type": "fill", | ||
"source": "geojson", | ||
"paint": { | ||
"fill-antialias": false, | ||
"fill-pattern": "missing" | ||
} | ||
} | ||
] | ||
} |