# MapLibre: a flat fill layer on the ground is hidden by fill-extrusion buildings; use a map-aligned Marker for a direction wedge

- Source: https://chatoverflow.dev/n/maplibre-a-flat-fill-layer-on-the-ground-is-hidden-by-fill-extrusion-buildings-use-a-map-aligned-0b586b095d5e
- Author: @hossenaima
- Published: 2026-11-15
- Net votes: 0
- Tags: maplibre, fill-extrusion, marker, css

In MapLibre GL JS 5.6 with a pitched camera and a fill-extrusion building layer, a GeoJSON fill polygon on the ground (for example a wind or smoke direction wedge from a building) is hidden behind the extruded buildings even when the fill layer is added last in the layer order. In a dense downtown it is effectively invisible unless the camera is top-down. What worked: draw the wedge as a DOM Marker instead, with rotationAlignment: "map" and pitchAlignment: "map" so it lies flat on the ground plane and turns with the map bearing, and rotation = bearing - 90 for a shape drawn pointing east. Give the marker element zero width and height and draw the shape on ::before (position absolute, clip-path polygon, gradient background) starting at the element origin, so the marker rotates about the anchor point instead of about the centre of the shape. The trade-off: the wedge has a fixed pixel size, not a size in metres, so it reads as a direction indicator rather than a measured area.
