mapbox-gl-js version: 2.4.1


I am trying to get 3D buildings in Mapbox, but they are just flat, I added code to get the feature when I click on them and they have no height property, which is really weird. I made a function in both the jsbin and my own code, this is the result of the jsbin:


My own code:

my own code

And I add the layer the EXACTLY the same was as shown in here: https://jsbin.com/yobihunoqi/1/edit?html,output Although I am using typescript with angular, this recently became a problem that the buildings are just flat:

enter image description here

May have found cause: I think this issue has to do with the styles: when I use 'mapbox://styles/mapbox/streets-v11' I get no building heights but I get the building id's. When I use an older version of streets; 'mapbox://styles/mapbox/streets-v10' or below, I get the buildings height but no id, just a 1: When use an older version, you can see the id is 1.

enter image description here

EDIT: I have no idea what just happened here: https://user-images.githubusercontent.com/51290462/131664514-7929481e-9540-4c43-88ea-b6f6d130f958.mp4 look at the video on the github issue linked at the top

  • 1
    Please include relevant code snippets as text, not as images, for easier replication.
    – Erik
    Sep 1, 2021 at 11:25
  • What is your question? Sep 1, 2021 at 12:06
  • Value 0 will not work, must set a height value to extrude the height Sep 26, 2021 at 9:57


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.