Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update extrusion examples to use separate fill-extrusion type #3488

Merged
merged 2 commits into from
Nov 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions docs/_posts/examples/3400-01-27-3d-extrusion-floorplan.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
---
layout: example
category: example
title: Extrude polygons for 3D indoor mapping.
description: Create a 3D indoor map with the fill-extrude-height paint property.
tags:
description: Create a 3D indoor map with the fill-extrusion type.
tags:
- layers
---
<div id='map'>
Expand All @@ -28,29 +28,29 @@
});

map.addLayer({
'id': 'room-extrude',
'type': 'fill',
'id': 'room-extrusion',
'type': 'fill-extrusion',
'source': 'museumData',
'paint': {
// See the Mapbox Style Spec for details on property functions
// https://www.mapbox.com/mapbox-gl-style-spec/#types-function
'fill-color': {
// Get the fill-color from the source 'color' property.
'fill-extrusion-color': {
// Get the fill-extrusion-color from the source 'color' property.
'property': 'color',
'type': 'identity'
},
'fill-extrude-height': {
// Get fill-extrude-height from the source 'height' property.
'fill-extrusion-height': {
// Get fill-extrusion-height from the source 'height' property.
'property': 'height',
'type': 'identity'
},
'fill-extrude-base': {
// Get fill-extrude-base from the source 'base_height' property.
'fill-extrusion-base': {
// Get fill-extrusion-base from the source 'base_height' property.
'property': 'base_height',
'type': 'identity'
},
// Make extrusions slightly opaque for see through indoor walls.
'fill-opacity': 0.5
'fill-extrusion-opacity': 0.5
}
});
});
Expand Down
22 changes: 11 additions & 11 deletions docs/_posts/examples/3400-01-30-3d-buildings.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
layout: example
category: example
title: Display buildings in 3D
description: Use extrusions to display buildings' height in 3D
tags:
---
layout: example
category: example
title: Display buildings in 3D
description: Use extrusions to display buildings' heights in 3D.
tags:
- layers
---
<div id='map'></div>
Expand All @@ -25,19 +25,19 @@
'source': 'composite',
'source-layer': 'building',
'filter': ['==', 'extrude', 'true'],
'type': 'fill',
'type': 'fill-extrusion',
'minzoom': 15,
'paint': {
'fill-color': '#aaa',
'fill-extrude-height': {
'fill-extrusion-color': '#aaa',
'fill-extrusion-height': {
'type': 'identity',
'property': 'height'
},
'fill-extrude-base': {
'fill-extrusion-base': {
'type': 'identity',
'property': 'min_height'
},
'fill-opacity': .6
'fill-extrusion-opacity': .6
}
});
});
Expand Down