geosolution/cell~ScatterPoint(options)

散点图模型的组成元素。

Summary

Methods:
destroy

销毁对象,如果元素已经添加到其模型,需要先从模型中移除后再销毁

getId

获取对象的唯一标识符

Constructor

new ScatterPoint(options)

Parameters:
Name Type Description
options Object

设置项。

Name Type Description
type String

散点的类型。枚举值,包括"BubblePoint"、"BreathPoint"、"BubbleCircle"、"BreathCircle"、“SpreadPoint”。默认值为"BubblePoint"。

center module:basetype~Coordinate

散点的中心点坐标。默认值为new hmap.basetype.Coordinate(0,0,0)。

minSize Number

散点的直径,像素。大于等于0时有效,不提供或小于0使用默认值10.0。

maxSize Number

散点动画的最大直径,像素单位。大于等于0时有效,不提供或小于0时使用默认值options.minSize。

freq Number

散点的动画更新频率,即周期时间,毫秒。大于0时有效,不提供或小于等于0时使用默认值3000。

color module:style~Color

散点的颜色。默认值为hmap.style.Color(255,0,0,1)。

colorChange module:style~Color

"BubblePoint"类型散点的变化颜色,默认值等于options.color。

colorRange Array.<Number>

长度为2的数组。"BubblePoint"、"BubbleCircle"、"BreathCircle"类型散点的颜色变化区间。区间第一个值对应最小,第二值对应最大。计算方式为颜色分量与该区间值相乘。默认[1.0,0.0]。不提供或超出范围使用默认。

Throws:

参数类型不对,对应方法运行报错

Example
let scatter=new hmap.geosolution.cell.ScatterPoint({
     center:new hmap.basetype.Coordinate(120.235078,30.19345,0),
     type:"BubblePoint",//枚举值,"BubblePoint"、"BreathPoint"、"BubbleCircle"、"BreathCircle"
     size:2,
     maxSize:20,
     color:new hmap.style.Color(255,0,0,1),
     colorChange:new hmap.style.Color(255,255,0,1),//"BubblePoint"专用
     colorRange:[1.0,0.0]//"BubblePoint"、"BubbleCircle"、"BreathCircle"使用
});

Methods

destroy()

销毁对象,如果元素已经添加到其模型,需要先从模型中移除后再销毁

getId() → {String}

获取对象的唯一标识符

Returns:
String -

对象的唯一标识符