Global

Members

(constant) ANCHORS

描述:
  • 锚点

Properties:
Name Type Description
leftTop

左上

topLeft
leftCenter

左中

centerLeft
left
leftBottom

左下

bottomLeft
centerTop

上中

topCenter
top
center

中心

centerBottom

下中

bottomCenter
bottom
rightTop

右上

topRight
rightCenter

右中

centerRight
right
rightBottom

右下

bottomRight

锚点

(constant) ArrowProperty

描述:
  • 箭头属性

Properties:
Name Type Description
coords Array.<Array.<Array>>

[起点,终点]

angle Array

箭头到尾部的点取值与角度

_ BaseObjectProperty

包含基本属性

_ StyleProperty

包含样式属性

箭头属性

Example
// headline: 箭头长度百分比,
// theta: 与箭头直线夹角
// isConst: headline是否是常量,1 是 0 否(默认)

// [headline, theta, isConst(可选)]
pointAngle = [
    [0.2, 30],
    [0.12, 15],
    [1.1, 8],
]

(constant) BaseObjectProperty

描述:
  • 原始对象属性

Properties:
Name Type Description
visible Boolean

是否可见

clickable Boolean

是否可点击

draggable Boolean

是否可拖拽

zindex Number

层级

zooms Array

可显示层级范围

opacity Number

透明度 0-1

原始对象属性

(constant) BezierCurveProperty

描述:
  • 三次贝塞尔曲线属性

Properties:
Name Type Description
coords Array.<Array.<Array>>

[起点,控制点1,控制点2,终点]

_ BaseObjectProperty

包含基本属性

_ StyleProperty

包含样式属性

三次贝塞尔曲线属性

(constant) CircleProperty

描述:
  • 圆属性

Properties:
Name Type Description
coords Array.<Array>

圆心

radius number

半径

radiusUnit string

半径单位 px / m

_ BaseObjectProperty

包含基本属性

_ StyleProperty

包含样式属性

圆属性

(constant) IconProperty

描述:
  • 属性

Properties:
Name Type Description
src string | Image

url 或 Image

coords Array.<Array>

坐标

crossOrigin *

跨域

size Array

宽高

anchor ANCHORS

锚点

rotate number

旋转角度

_ BaseObjectProperty

包含基本属性

_ StyleProperty

包含样式属性

属性

(constant) LabelProperty

描述:
  • 标签属性

Properties:
Name Type Description
coords Array.<array>

坐标

text string

文本

textWeight string | number

字体的粗细 默认normal/ bold

textSize number

字体大小 默认 18

textSizeUnit string

字体大小单位 px/m

textFont string

字体样式 默认 Arial

backType string

背景轮廓类型

backStyle StyleProperty

背景样式

maxWidth number

最大宽度,超过换行,单位同 textSizeUnit

anchor ANCHORS

锚点

rotate number

旋转角度

padding Array

[left,top,right,bottom]内边距

_ BaseObjectProperty

包含基本属性

_ StyleProperty

包含样式属性

标签属性

(constant) MapObjProperty

描述:
  • 地图对象对象属性

Properties:
Name Type Description
id String

地图对象对象属性

(constant) PolygonProperty

描述:
  • 多边形属性

Properties:
Name Type Description
coords Array.<Array.<Array.<Array>>>

路径

dilution Object

抽稀

Properties
Name Type Attributes Default Description
threshold Number <optional>
1.5

阈值 px

length Number <optional>
200

点超过则抽稀

_ BaseObjectProperty

包含基本属性

_ StyleProperty

包含样式属性

多边形属性

(constant) PolylineProperty

描述:
  • 折线属性

Properties:
Name Type Description
coords Array.<Array.<Array>>

路径

dilution Object

抽稀

Properties
Name Type Attributes Default Description
threshold Number <optional>
1.5

阈值 px

length Number <optional>
200

点超过则抽稀

_ BaseObjectProperty

包含基本属性

_ StyleProperty

包含样式属性

折线属性

(constant) QuadraticCurveProperty

描述:
  • 二次贝塞尔曲线属性

Properties:
Name Type Description
coords Array.<Array.<Array>>

[起点,控制点,终点]

_ BaseObjectProperty

包含基本属性

_ StyleProperty

包含样式属性

二次贝塞尔曲线属性

(constant) RectProperty

描述:
  • 矩形属性

Properties:
Name Type Description
bounds Array.<Array.<Array>>

[[left,top],[right,bottom]]

_ BaseObjectProperty

包含基本属性

_ StyleProperty

包含样式属性

矩形属性

(constant) RingProperty

描述:
  • 圆环属性

Properties:
Name Type Description
coords Array.<Array>

圆心

radius number

半径

outRadius number

外径

radiusUnit string

半径单位 px / m

_ BaseObjectProperty

包含基本属性

_ StyleProperty

包含样式属性

圆环属性

(constant) RouteProperty

描述:
  • 路线属性

Properties:
Name Type Description
coords Array.<Array.<Array>>

路径

icon string | Image

图标

iconDirection String

图标朝向, 默认右

size Array

图标大小

crossOrigin *

跨域

space number

图标间隔 px

_ BaseObjectProperty

包含基本属性

_ StyleProperty

包含样式属性

路线属性

(constant) StyleProperty

描述:
  • 样式属性

Properties:
Name Type Description
fillColor String

填充颜色

fillOpacity Number

填充透明度

lineColor String

填充颜色

lineWidth String

轮廓宽度

lineWidthUnit String

轮廓宽度单位 px/m

lineOpacity String

轮廓透明度

lineDash Array

轮廓虚线

lineDashOffset Number

轮廓虚线偏移量

lineCap String

线段末端 butt,round,square

lineJoin String

线段连接处 round,bevel,miter

opacity String

透明度

shadowColor String

阴影颜色

shadowOffsetX Number

阴影水平方向的偏移

shadowOffsetY Number

阴影垂直方向的偏移

shadowBlur String

阴影模糊, 越大越模糊

styleGroup Array.<StyleProperty>

样式组 包含以上参数

zooms Array

样式组中各样式显示的层级范围

样式属性

(constant) WindCircleProperty

描述:
  • 风圈属性

Properties:
Name Type Description
coords Array.<Array>

坐标

radiusAngle Array.<Array.<Array>>

顺指针, 东方向为 0

_ BaseObjectProperty

包含基本属性

_ StyleProperty

包含样式属性

风圈属性

Methods

bounds2path(param) → {Array}

描述:
  • 范围按顺时针转换成路径

Parameters:
Name Type Description
param Array

[[left, top], [right, bottom]]

Returns:
Type
Array

boundsCenter(bounds) → {Array}

描述:
  • 获取bounds中心

Parameters:
Name Type Description
bounds Array

[[left, top], [right, bottom]]

Returns:
Type
Array

debounce(fn, delay)

Parameters:
Name Type Description
fn Fuction

函数

delay Number

延迟毫秒

Returns:

防抖函数

fromArcJSON(arcjson, foreachFn)

描述:
  • 解析json

Parameters:
Name Type Description
arcjson Object

arcgis格式数据

foreachFn function

遍历函数

fromGeoJSON(json, foreachFn, options)

描述:
  • GeoJSON 格式转换成Overlay

Parameters:
Name Type Description
json Object

geojson数据

foreachFn function

回调函数,参数为overlay

options Object

{}

getGeoBounds(json) → {Array}

描述:
  • 获取geojson数据bounds

Parameters:
Name Type Description
json *
Returns:

[[][]]

Type
Array

path2bounds(path) → {Array}

描述:
  • 将路径转换成经纬度范围 !!! 注意 top > bottom

Parameters:
Name Type Description
path Array
Returns:

[[left, top], [right, bottom]]

Type
Array

返回顶部