【Mapbox】建筑矢量切片加载显示

map.on('load', function() {

                map.addLayer({
                    "id": "guanzhou",
                    "type": "fill-extrusion",
                    "source": {
                        type: 'vector',
                        tiles: ['http://192.168.182.1:6767/{z}/{x}/{y}.pbf']
                    },
                    "source-layer": "广州",
                    'layout': {},
                    'paint': { 
                        'fill-extrusion-color': [
                            "interpolate",
                            ["exponential", 0.99],
                            ["get", "Floor"],
                            0,
                            "#FFF6B7",
                            100,
                            "#F6416C"
                        ],
                        'fill-extrusion-height': [
                            "interpolate", ["linear"],
                            ["zoom"],
                            15, 0,
                            15.05, ["get", "Floor"]
                        ],
                        'fill-extrusion-base': 0,
                        'fill-extrusion-opacity': 0.6
                    }
                });

            });

 

posted @ 2021-07-17 16:03  咸鱼翻身  阅读(452)  评论(0编辑  收藏  举报