-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
Description
mapbox-gl-js version
3.19.1
Browser and version
Chrome 145.0.7632.159
Expected behavior
A fill-extrusion layer with fill-extrusion-ambient-occlusion-intensity > 0 should not alter rendering of a fill layer with a fill-z-offset.
Actual behavior
A fill-extrusion layer with fill-extrusion-ambient-occlusion-intensity: 0 will happily render a fill layer with a fill-z-offset set to the fill-extrusion-height above the extrusion, as shown here:
However changing the fill-extrusion-ambient-occlusion-intensity to > 0 will cause the fill layer to disapear.
Link to the demonstration
No response
Steps to trigger the unexpected behavior
const map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/light-v11',
center: [151.2804924, -33.8332455],
zoom: 20,
pitch: 45,
bearing: -20
});
map.on('load', () => {
map.addSource('polygon', {
'type': 'geojson',
'data': {
'type': 'FeatureCollection',
'features': [
{
'type': 'Feature',
'geometry': {
'type': 'Polygon',
'coordinates': [[[151.28049658597178, -33.83313240830963], [151.28049658597178, -33.8332436482681], [151.28062665499317, -33.8332436482681], [151.28062665499317, -33.83313240830963], [151.28049658597178, -33.83313240830963]]]
},
'properties': {}
}
]
}
});
map.addLayer({
'id': 'fill-extrusion',
'type': 'fill-extrusion',
'source': 'polygon',
'paint': {
'fill-extrusion-color': '#ff0000', //red
'fill-extrusion-ambient-occlusion-intensity': 1,
'fill-extrusion-height': 10,
}
})
map.addLayer({
'id': 'fill',
'type': 'fill',
'source': 'polygon',
'paint': {
'fill-color': '#0000ff', // blue
'fill-z-offset': 10,
}
})
})Relevant log output
Reactions are currently unavailable