我正在寻找使用github / mapbox / react-native-mapbox-gl
在React-Native应用中渲染3D建筑物的方法我在MapBox Studio中创建了一个自定义地图,将以下行添加到style.json中并在Mapbox Studio中上传了地图
{
"id": "buildings",
"type": "fill-extrusion",
"source": "composite",
"source-layer": "building",
"minzoom": 15,
"filter": [
"all",
[
"==",
"extrude",
"true"
],
[
">",
"height",
1
]
],
"paint": {
"fill-extrusion-color": "hsl(206, 7%, 61%)",
"fill-extrusion-height": {
"type": "identity",
"property": "height"
},
"fill-extrusion-base": {
"type": "identity",
"property": "min_height"
},
"fill-extrusion-opacity": 1,
"fill-extrusion-translate-anchor": "viewport"
}
}
建筑物在mapbox-studio中按预期渲染,但当我回到我的React-Native App时,地图会显示但没有建筑物。
你们有没有想过如何用react-native-mapbox-gl sdk在3D中显示建筑物?
感谢。
Screenshot of mapbox studio Screenshot of the React-Native Map