Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MarkerShape

MarkerShape用于划定Marker的可点击区域范围。需要注意的是,在IE浏览器中图标透明区域默认为不触发事件,因此MarkerShape在IE中不起作用。

Hierarchy

  • MarkerShape

Index

Constructors

Methods

Constructors

constructor

  • new MarkerShape(options: { coords?: number[]; type?: string }): MarkerShape
  • Parameters

    • options: { coords?: number[]; type?: string }
      • Optional coords?: number[]

        可点击区域组成元素数组,存放图形的像素坐标等信息,该数组元素由type决定:

        • circle:coords格式为 [x1, y1, r],x1,y1为圆心像素坐标,r为圆半径
        • poly: coords格式为 [x1, y1, x2, y2 … xn, yn],各x,y表示多边形边界像素坐标
        • rect: coords格式为 [x1, y1, x2, y2],x1,y1为矩形左上角像素坐标,x2,y2为矩形右下角像素坐标 Markshape的像素坐标是指相对于marker的左上角的像素坐标偏移量
      • Optional type?: string

        可点击区域类型,可选值:

        • circle:圆形
        • poly:多边形
        • rect:矩形

    Returns MarkerShape

Methods

toString

  • toString(): string
  • To silence lint error, this class has to be exists.

    Returns string

Generated using TypeDoc