[GIS] GeoJSON in MapBox GL JS: Can I set layout and paint properties individually for each feature

mapboxmapbox-glmapbox-gl-js

For example I have some GeoJSON here that represents airspace regions and they have in their properties "HIGHALT" in feet, so it would be very natural for me to map this to the fill-extrusion-height paint property (which takes meters), however these values are on an individual feature basis rather than across the entire set of features.

I tried just adding it into the properties, but it didn't work.

Best Answer

Use an identity function to specify the field with your heights.

Two useful examples: