> For the complete documentation index, see [llms.txt](https://docs.mapbox.com/mapbox-gl-js/llms.txt)

# Display icons above 3D buildings

This example uses a `symbol-z-elevate` property to display a symbol layer above fill extrusions and models.

> **Note: Performance caveats of the property**
> 
> To have minimal impact on performance, this is supported only when `fill-extrusion-height` is not zoom-dependent and remains unchanged. For more details about `symbol-z-elevate` follow [the link](https://docs.mapbox.com/style-spec/reference/layers/#layout-symbol-symbol-z-elevate).

> **Note (warning): Supported File Types**
> 
> Only `.png`, `.jpg` and `.webp` formats are supported when loading images into a style at runtime using [`map.loadImage()`](https://docs.mapbox.com/mapbox-gl-js/api/map/#map#loadimage). Other file types like `.svg` are not supported.

> Example code:

**JavaScript**

```html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Display icons above 3D buildings</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<link href="https://api.mapbox.com/mapbox-gl-js/v3.30.0/mapbox-gl.css" rel="stylesheet">
<script src="https://api.mapbox.com/mapbox-gl-js/v3.30.0/mapbox-gl.js"></script>
<style>
body { margin: 0; padding: 0; }
#map { position: absolute; top: 0; bottom: 0; width: 100%; }
</style>
</head>
<body>
<div id="map"></div>
<script>
    const map = new mapboxgl.Map({
        // TO MAKE THE MAP APPEAR YOU MUST
        // ADD YOUR ACCESS TOKEN FROM
        // https://account.mapbox.com
        accessToken: 'YOUR_MAPBOX_ACCESS_TOKEN',
        container: 'map',
        style: 'mapbox://styles/mapbox/standard',
        center: [-74.010499, 40.705441],
        zoom: 15.1,
        pitch: 60
    });

    map.once('style.load', () => {
        map.setConfigProperty('basemap', 'showPointOfInterestLabels', false);
        map.setConfigProperty('basemap', 'showPlaceLabels', false);
        map.setConfigProperty('basemap', 'showRoadLabels', false);
        map.setConfigProperty('basemap', 'showTransitLabels', false);
    });

    map.once('load', () => {
        map.loadImage(
            'https://docs.mapbox.com/mapbox-gl-js/assets/cat.png',
            (error, image) => {
                map.addImage('cat', image);
                map.addSource('buildings', {
                    type: 'geojson',
                    data: {
                        type: 'FeatureCollection',
                        features: [
                            {
                                type: 'Feature',
                                geometry: {
                                    type: 'Point',
                                    coordinates: [
                                        -74.00923587095748, 40.70294276920271
                                    ]
                                }
                            }
                        ]
                    }
                });
                map.addLayer({
                    id: 'cat-on-building',
                    source: 'buildings',
                    slot: 'top',
                    type: 'symbol',
                    'layout': {
                        'icon-image': 'cat',
                        'icon-size': 0.1,
                        'symbol-placement': 'point',
                        'symbol-z-elevate': true
                    }
                });
            }
        );
    });
</script>

</body>
</html>
```

**React**

```jsx
import React, { useEffect, useRef } from 'react';
import * as mapboxgl from 'mapbox-gl/esm';

import 'mapbox-gl/dist/mapbox-gl.css';

const MapboxExample = () => {
  const mapContainerRef = useRef();
  const mapRef = useRef();

  useEffect(() => {
    mapRef.current = new mapboxgl.Map({
      // TO MAKE THE MAP APPEAR YOU MUST
      // ADD YOUR ACCESS TOKEN FROM
      // https://account.mapbox.com
      accessToken: 'YOUR_MAPBOX_ACCESS_TOKEN',
      container: mapContainerRef.current,
      style: 'mapbox://styles/mapbox/standard',
      center: [-74.010499, 40.705441],
      zoom: 15.1,
      pitch: 60
    });

    mapRef.current.once('style.load', () => {
      mapRef.current.setConfigProperty(
        'basemap',
        'showPointOfInterestLabels',
        false
      );
      mapRef.current.setConfigProperty('basemap', 'showPlaceLabels', false);
      mapRef.current.setConfigProperty('basemap', 'showRoadLabels', false);
      mapRef.current.setConfigProperty('basemap', 'showTransitLabels', false);
    });

    mapRef.current.once('load', () => {
      mapRef.current.loadImage(
        'https://docs.mapbox.com/mapbox-gl-js/assets/cat.png',
        (error, image) => {
          mapRef.current.addImage('cat', image);
          mapRef.current.addSource('buildings', {
            type: 'geojson',
            data: {
              type: 'FeatureCollection',
              features: [
                {
                  type: 'Feature',
                  geometry: {
                    type: 'Point',
                    coordinates: [-74.00923587095748, 40.70294276920271]
                  }
                }
              ]
            }
          });
          mapRef.current.addLayer({
            id: 'cat-on-building',
            source: 'buildings',
            slot: 'top',
            type: 'symbol',
            layout: {
              'icon-image': 'cat',
              'icon-size': 0.1,
              'symbol-placement': 'point',
              'symbol-z-elevate': true
            }
          });
        }
      );
    });
  }, []);

  return <div ref={mapContainerRef} id="map" style={{ height: '100%' }}></div>;
};

export default MapboxExample;
```