-
-
Notifications
You must be signed in to change notification settings - Fork 648
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Elevation per polygon for fill extrusions (#3841)
* Elevation per polygon for fill extrusions * basic test for fill extrusion bucket * Revert "basic test for fill extrusion bucket" This reverts commit 3b13b20. * render test for multipolygon fill extrusions * Moved test into terrain folder * Update CHANGELOG.md --------- Co-authored-by: Harel M <harel.mazor@gmail.com>
- Loading branch information
1 parent
3344d80
commit b94fac4
Showing
4 changed files
with
179 additions
and
8 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
Binary file added
BIN
+255 KB
test/integration/render/tests/terrain/fill-extrusion-multipolygon/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
165 changes: 165 additions & 0 deletions
165
test/integration/render/tests/terrain/fill-extrusion-multipolygon/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,165 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"height": 500, | ||
"width": 500, | ||
"timeout": 60000, | ||
"operations": [ | ||
[ | ||
"sleep", | ||
5000 | ||
] | ||
] | ||
} | ||
}, | ||
"center": [ | ||
11.037826538085028, | ||
47.49076091764255 | ||
], | ||
"zoom": 13, | ||
"pitch": 60, | ||
"bearing": -60, | ||
"sources": { | ||
"terrainSource": { | ||
"type": "raster-dem", | ||
"tiles": [ | ||
"local://tiles/terrain-shading/{z}-{x}-{y}.terrain.png" | ||
], | ||
"minzoom": 0, | ||
"maxzoom": 12 | ||
}, | ||
"hillshadeSource": { | ||
"type": "raster-dem", | ||
"tiles": [ | ||
"local://tiles/terrain-shading/{z}-{x}-{y}.terrain.png" | ||
], | ||
"minzoom": 0, | ||
"maxzoom": 12 | ||
}, | ||
"geojson": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"geometry": { | ||
"type": "MultiPolygon", | ||
"coordinates": [ | ||
[ | ||
[ | ||
[ | ||
11.038, | ||
47.48 | ||
], | ||
[ | ||
11.035, | ||
47.48 | ||
], | ||
[ | ||
11.035, | ||
47.485 | ||
], | ||
[ | ||
11.038, | ||
47.485 | ||
], | ||
[ | ||
11.038, | ||
47.48 | ||
] | ||
] | ||
], | ||
[ | ||
[ | ||
[ | ||
11.04, | ||
47.49 | ||
], | ||
[ | ||
11.037, | ||
47.49 | ||
], | ||
[ | ||
11.037, | ||
47.495 | ||
], | ||
[ | ||
11.04, | ||
47.495 | ||
], | ||
[ | ||
11.04, | ||
47.49 | ||
] | ||
] | ||
], | ||
[ | ||
[ | ||
[ | ||
11.043, | ||
47.50 | ||
], | ||
[ | ||
11.046, | ||
47.50 | ||
], | ||
[ | ||
11.046, | ||
47.505 | ||
], | ||
[ | ||
11.043, | ||
47.505 | ||
], | ||
[ | ||
11.043, | ||
47.50 | ||
] | ||
] | ||
] | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "background", | ||
"type": "background", | ||
"paint": { | ||
"background-color": "white" | ||
} | ||
}, | ||
{ | ||
"id": "hills", | ||
"type": "hillshade", | ||
"source": "hillshadeSource", | ||
"layout": { | ||
"visibility": "visible" | ||
}, | ||
"paint": { | ||
"hillshade-shadow-color": "#473B24", | ||
"hillshade-illumination-anchor": "map", | ||
"hillshade-illumination-direction": 150 | ||
} | ||
}, | ||
{ | ||
"id": "extrusion", | ||
"type": "fill-extrusion", | ||
"source": "geojson", | ||
"paint": { | ||
"fill-extrusion-height": 100, | ||
"fill-extrusion-base": 10, | ||
"fill-extrusion-color": "#999" | ||
} | ||
} | ||
], | ||
"terrain": { | ||
"source": "terrainSource", | ||
"exaggeration": 1 | ||
} | ||
} |