mapboxmapbox-gl-jsmapbox-marker

Mapbox programmatically add polygon with different heights


We are trying to create a polygon programmatically in typescript using mapbox gl. But starting height and ending height of the polygon will be different to create a slope. Please let me know is there any way to achieve this requirement. enter image description here


Solution

  • Mapbox GL JS does not support 3D shapes with sloping surfaces. You could use something like three.js (via ThreeBox) to achieve it.