gpt4 book ai didi

mapbox-gl-js - 只为圆形mapbox gl js的边缘着色

转载 作者:行者123 更新时间:2023-12-01 12:28:46 29 4
gpt4 key购买 nike

我想在交互式 map 上显示一个圆圈的轮廓(无填充)但是,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"]
}];

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

最佳答案

现在可以使用 circle-opacity .

例如。:

"paint": {
"circle-opacity": 0,
"circle-stroke-width": 1,
"circle-stroke-color": #000
}

关于mapbox-gl-js - 只为圆形mapbox gl js的边缘着色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36775977/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com