mapbox / mapbox-unity-sdk

Mapbox Unity SDK - https://www.mapbox.com/unity/
Other
725 stars 210 forks source link

Mapbox building:levels property support of Unity SDK #1921

Closed KAlO2 closed 6 months ago

KAlO2 commented 6 months ago

Dear Mapbox developers, I found that some building's height data is not correctly displayed under the Unity SDK (left) but Android SDK (right). image

I work nearby Shenzhen Kexing Science Park (深圳科兴科学园), and the height data is not correct. I know that 3m is the default height if no one edits and uploads the data.

I've checked OpenStreetMap, the building:levles data is updated 2 years ago. image

Mapbox Studio deduces the building's height to be approximate 48m by levels x 3, here levels=16. image

So I guess that Android SDK has used building:levels info to render correctly (correct me if I'm wrong). After I debug VectorTile data under Unity (the image below), no building:levels property is found in json, or HighlightBuilds.cs demo (the first image above). DZM4OgLBCv Here comes the question: Are there any plans to support building:levels property? If Mapbox supports this feature already, what URL get request format should I send? https://studio.mapbox.com/tilesets/mapbox.mapbox-streets-v7/#{z}/{x}/{y}

Looking forward to your reply.

brnkhy commented 6 months ago

Hey @KAlO2, I think this might be a tileset issue. I believe mapbox studio uses v8 at the moment while unity sdk defaults to v7. Can you please try changing data source as seen below? I think this will fix the issue.

Screenshot 2024-05-17 at 12 53 32 PM
KAlO2 commented 6 months ago

Hello @brnkhy, you saved my day.😃

I've tried option Mapbox Streets V8 with Building Ids, but I didn't try Mapbox Streets V8 since the former name seems to bring more things. From the image below, V8 with Building Ids (still with wrong height) is not well supported? img_v3_02av_6510709d-9dcf-47e7-8456-514b130a978g image

brnkhy commented 6 months ago

@KAlO2 happy to hear it worked! I'm not exactly sure what's wrong with the second one but it's probably due to that second tileset breaking something. maybe the v8 doesn't override it in that region for some reason. "with ids" should be deprecated really.