-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
raster-masking test combined with vector. Refactor raster overlap.
Return map z -> StencilMode instead of using callbacks. overlapping-vector uses vector layer between two raster to guard against side effects when refactoring stencil usage.
- Loading branch information
Showing
5 changed files
with
114 additions
and
27 deletions.
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
Binary file added
BIN
+152 KB
test/integration/render-tests/raster-masking/overlapping-vector/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
90 changes: 90 additions & 0 deletions
90
test/integration/render-tests/raster-masking/overlapping-vector/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,90 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"height": 256 | ||
} | ||
}, | ||
"center": [ | ||
-122.48, | ||
37.84 | ||
], | ||
"zoom": 14, | ||
"sources": { | ||
"contour": { | ||
"type": "raster", | ||
"tiles": [ | ||
"local://tiles/{z}-{x}-{y}.contour.png" | ||
], | ||
"maxzoom": 17, | ||
"tileSize": 256 | ||
}, | ||
"geojson": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "Polygon", | ||
"coordinates": [ | ||
[ | ||
[ | ||
-123, | ||
37.839 | ||
], | ||
[ | ||
-123, | ||
37.843 | ||
], | ||
[ | ||
-122, | ||
37.843 | ||
], | ||
[ | ||
-122, | ||
37.839 | ||
], | ||
[ | ||
-123, | ||
37.839 | ||
] | ||
] | ||
] | ||
} | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "background", | ||
"type": "background", | ||
"paint": { | ||
"background-color": "white" | ||
} | ||
}, | ||
{ | ||
"id": "raster", | ||
"type": "raster", | ||
"source": "contour", | ||
"paint": { | ||
"raster-fade-duration": 0 | ||
} | ||
}, | ||
{ | ||
"id": "fill", | ||
"type": "fill", | ||
"source": "geojson", | ||
"paint": { | ||
"fill-antialias": false, | ||
"fill-color": "green", | ||
"fill-opacity": 0.2 | ||
} | ||
}, | ||
{ | ||
"id": "raster-transparent", | ||
"type": "raster", | ||
"source": "contour", | ||
"paint": { | ||
"raster-fade-duration": 0, | ||
"raster-opacity": 0.5, | ||
"raster-hue-rotate": 90 | ||
} | ||
} | ||
] | ||
} |