小编ben*_*enj的帖子

仅为圆形地图框 gl js 的边缘着色

我想在交互式地图上显示圆圈的轮廓(无填充),但是 mapbox-gl-js 中的绘制选项似乎仅限于填充。 https://www.mapbox.com/mapbox-gl-style-spec/#layers-circle

var styles = [{
    "id": 'points',
    "interactive": true,
    "type": "circle",
    "source": "geojson",
    "paint": {
        "circle-radius": 5,
        "circle-color": "#000
    },
    "filter": ["in", "$type", "Point"]
}, {
    "type": "line",
    "source": "geojson",
    "layout": {
      "line-cap": "round",
      "line-join": "round"
    },
    "paint": {
      "line-color": "#000",
      "line-width": 2.5
    },
    "filter": ["in", "$type", "LineString"]
}];
Run Code Online (Sandbox Code Playgroud)

我错过了什么还是这不可能?

mapbox-gl-js

3
推荐指数
1
解决办法
2941
查看次数

标签 统计

mapbox-gl-js ×1