![img]("text-rotate": ["get", "course"],https://img-mid.csdnimg.cn/release/static/image/mid/ask/887638163146126.png "#left")
addlayer的样式设置如下:
let layerConfig = {
id: meatureTextLayer,
type: "symbol",
source: meatureSource,
filter: ["==", "$type", "LineString"],
layout: {
"text-field": "GC: {mile}nm",
"text-font": ["arial"],
"text-size": 12,
"text-padding": 10,
"text-offset": [0, 1.5],
"text-anchor": "center",
"text-rotation-alignment": "map",
"symbol-placement": "line-center",
"text-ignore-placement": true,
"text-allow-overlap": true,
},
paint: {
"text-color": "black",
/* , "text-halo-blur": 0 */
//"text-halo-color": "rgba(255,255,255,0.8)",
"text-halo-color": "rgba(182,235,219,0.8)",
"text-halo-width": 1.5,
}
};
线段长度大一点,或者地图放大时,线段内出现多个文本信息,
怎么设置,一个线段内只显示一个GC和RL信息