Skip to content

Documentation / @geoverse/core-ol / MarkerOptions

Interface: MarkerOptions

Defined in: packages/core-ol/src/features/marker.ts:8

Properties

anchor?

ts
optional anchor?: number[];

Defined in: packages/core-ol/src/features/marker.ts:22

图标锚点,默认 [0.5, 0.5]


cancelBubble?

ts
optional cancelBubble?: boolean;

Defined in: packages/core-ol/src/features/marker.ts:24

阻止事件冒泡到下层要素


color?

ts
optional color?: string;

Defined in: packages/core-ol/src/features/marker.ts:18

圆点颜色(无图标时),默认 blue


icon?

ts
optional icon?: string;

Defined in: packages/core-ol/src/features/marker.ts:12

图标地址;不传则渲染为圆点


offset?

ts
optional offset?: number[];

Defined in: packages/core-ol/src/features/marker.ts:20

图标偏移


position?

ts
optional position?: Coordinate;

Defined in: packages/core-ol/src/features/marker.ts:10

位置(WGS-84 经纬度)


projection?

ts
optional projection?: string;

Defined in: packages/core-ol/src/features/marker.ts:26

几何坐标投影,默认 EPSG:3857(加入 GMap 后图层会同步重投影)


scale?

ts
optional scale?: number;

Defined in: packages/core-ol/src/features/marker.ts:14

图标缩放,默认 1


size?

ts
optional size?: number;

Defined in: packages/core-ol/src/features/marker.ts:16

圆点半径(无图标时),默认 5