MapLabel

map 的 addMapLabels 方法支持向底图上添加可参与碰撞的 label *

interface MapLabel {
    displayRange?: number[];
    name?: string;
    position?: Point;
    rank?: number;
    style?: MapLabelStyle;
    textMargin?: number;
}

属性

显示的级别范围,[fromZoom, toZoom]

显示的文字内容

墨卡托坐标

权重,值越高优先级越高

样式配置信息

文字距离坐标位置的像素边距