Leaflet 地图盒-我怎样才能像foursquare那样显示建筑物?

Leaflet 地图盒-我怎样才能像foursquare那样显示建筑物?,leaflet,mapbox,Leaflet,Mapbox,这就是我的意思 请看以下来自foursquare的屏幕截图: 但是,使用街景,在相同的缩放级别下,相同区域在我的地图中的外观如下所示: 正如你所看到的,建筑物没有出现。如何显示这些建筑?如果使用mapbox gl js API,我可能知道解决方案。 我认为您需要添加另一层,我是这样做的(将下面的代码添加到您的客户端JavaScriptt文件中): `map.on('load', function () { map.addLayer({ 'id': '3d-buildi

这就是我的意思

请看以下来自foursquare的屏幕截图:

但是,使用街景,在相同的缩放级别下,相同区域在我的地图中的外观如下所示:


正如你所看到的,建筑物没有出现。如何显示这些建筑?

如果使用mapbox gl js API,我可能知道解决方案。 我认为您需要添加另一层,我是这样做的(将下面的代码添加到您的客户端JavaScriptt文件中):

`map.on('load', function () {
    map.addLayer({
        'id': '3d-buildings',
        'source': 'composite',
        'source-layer': 'building',
        'filter': ['==', 'extrude', 'true'],
        'type': 'fill-extrusion',
        'minzoom': 14,
        'paint': {
            'fill-extrusion-color': '#aaa',
            'fill-extrusion-height': {
                'type': 'identity',
                'property': 'height'
            },
            'fill-extrusion-base': {
                'type': 'identity',
                'property': 'min_height'
            },
            'fill-extrusion-opacity': .6
        }
    });
});`