首页 / 浏览问题 / 其他 / 问题详情
超图FAQ:【iClient】iClient for MapboxGL,如何改线设置箭头符号,且箭头方向和线方向保证一致?
64,468EXP 2023年04月11日
【iClient】iClient for MapboxGL,如何改线设置箭头符号,且箭头方向和线方向保证一致?

1个回答

【解决办法】示例代码如下 map.addLayer({ id: "line", source: "line", type: "symbol", layout: { "text-field": "▶", "text-transform": "uppercase", "text-keep-upright": false, "text-rotation-alignment": "map", "symbol-placement": "line-center", "text-size": 12, } }) 主要注意text-keep-upright默认为true,需设置为false,箭头即可沿着线的方向渲染
64,468EXP 2023年04月11日
热门文章
关注我们
...