用于分隔重叠线的 Mapbox 样式
Mapbox style to separate overlapping lines
给定两个占据相同空间的线串 space,是否可以定义一种样式,使线条彼此偏移并并排呈现?
一位同事说他记得一半在 style spec 中有这个功能,但我一直没能找到它的参考资料。可能吗?
您要找的属性是"Line-Offset"。
来自文档(paint-line-line-offset 截至 2018-09-17):
line-offset (Paint property) Optional number. Units in pixels. Defaults to 0. Transitionable.
The line's offset.
For linear features, a positive value offsets the line to the right, relative
to the direction of the line, and a negative value to the left.
For polygon features, a positive value results in an inset, and a negative value results in an outset.
给定两个占据相同空间的线串 space,是否可以定义一种样式,使线条彼此偏移并并排呈现?
一位同事说他记得一半在 style spec 中有这个功能,但我一直没能找到它的参考资料。可能吗?
您要找的属性是"Line-Offset"。
来自文档(paint-line-line-offset 截至 2018-09-17):
line-offset (Paint property) Optional number. Units in pixels. Defaults to 0. Transitionable.
The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.