Mapbox - 从数据库中以自定义高度挤​​压 3D 建筑物?

Mapbox - extrude buildings in 3D with custom height from database?

我正在使用 Mapbox GL JS 以 3D 方式挤压建筑物,就像在官方文档中所做的那样: https://docs.mapbox.com/mapbox-gl-js/example/3d-buildings/

但是,现在我想从 MySQL 数据库中更改某些建筑物的高度。 我想如果我只是比较来自 OSM 的建筑 ID 它会起作用,但是,Mapbox 'building' 源层没有 ID 字段:https://docs.mapbox.com/vector-tiles/reference/mapbox-streets-v8/#building

我对这个问题的最佳解决方案是什么?我看到以前有人问过类似的问题,但没有解决方案。 谢谢

However, now I want to change the height of certain buildings with my own from a MySQL database.

不太清楚你的意思。但一般来说,如果矢量切片数据中没有 ID,则连接来自某些外部源的数据将极其困难。您可能必须使用自己的建筑数据而不是 Mapbox 数据。