PointIconStyle

点图标样式配置

interface PointIconStyle {
    anchors?: [number, number];
    height?: number | StyleExpress;
    icon?: StyleExpress;
    iconObj?: (
        style: object,
        properties: object,
    ) => { canvas: HTMLCanvasElement; id: number };
    offset?: [number, number];
    opacity?: number | StyleExpress;
    rotation?: number | StyleExpress;
    scale?: number | StyleExpress;
    sizes?: [number, number];
    userSizes?: boolean;
    width?: number | StyleExpress;
}

属性

坐标点对应的锚点,中间点为[0,0],取值范围[-1,1]

点的高度

图标地址URL

通过函数形式返回图标,id代表图标标识,canvas代表图标来源

偏移量 [x, y],单位像素

透明度,取值范围0 - 1

旋转角度,单位度

缩放比例

点的大小 [宽, 高]

是否使用sizes的宽高,而非width和height,默认值:true

点的宽度