mapbox / mapbox-gl-js

Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL
https://docs.mapbox.com/mapbox-gl-js/
Other
11.2k stars 2.22k forks source link

3d-building layer does not have 'height' property and all buildings are flat #10981

Open Philip2809 opened 3 years ago

Philip2809 commented 3 years ago

mapbox-gl-js version: 2.4.1

browser: Brave (Chromium)

Hello! 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: image My own code: image

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: image

Please help me solve this, I removed my token from the jsbin for obvious reasons. Best Regards Philip Magyar

Philip2809 commented 3 years ago

Hi again!

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. image

I have tried reinstalling mapbox-gl npm package but that did not help. Best Regards Philip

Philip2809 commented 3 years ago

Ok: this is really weird, why is it like this?

https://user-images.githubusercontent.com/51290462/131664514-7929481e-9540-4c43-88ea-b6f6d130f958.mp4

SnailBones commented 3 years ago

Might be related to #10950 and #10355.

ted-piotrowski commented 2 years ago

Could this be related to max tile size in some way?

In very densely populated cities, the building height won't be included until zoom level 17 or 18, where in sparsely populated areas, the building height will be included in zoom level 15. Maybe Mapbox is selectively pruning data in order to fit underneath some maximum tile size?