1. Point
点图层中的点,该类型无法独立创建,只能通过点图层生成
1.1. 属性
属性名 | Type | Default | Description |
---|---|---|---|
color | String | 十六进制的颜色字符串 |
|
opacity | Number | 不透明度 |
|
positionsWGS84 | Array.<Number> |
经纬度坐标 |
1.2. 方法
1.2.1. point.modifyPosition(offset)
偏移点位置
Param | Type | Description |
---|---|---|
offset | Array.<Number> |
元素在xyz方向的偏移. |
Example
//创建点图层:pointLayer
//添加点 :point
point.modifyPosition([10, 20, 10]);
1.2.2. point.changeScale(scale)
缩放点(缩放广告牌,特效圈)
Param | Type | Description |
---|---|---|
scale | Number |
缩放比. |
Example
//创建点图层:pointLayer
//添加点 :point
point.changeScale(10);
1.2.3. point.changeLabel(options)
更改文字
Param | Type | Description |
---|---|---|
options | Object |
包含以下可选参数的Object对象: |
options.text | String |
修改文字内容 |
options.font | String |
修改文字字体 |
options.fontColor | String |
修改文字颜色 |
Example
//创建点图层:pointLayer
//添加点 :point
point.changeLabel({fontColor: '#a31515', font: 'italic bold 200px arial,sans-serif'});
1.2.4. point.changeBillBoard(options)
更改广告牌
Example
//创建点图层:pointLayer
//添加点 :point
point.changeBillBoard({imageColor: '#a31515', image: 'xxx.jpg'});
Param | Type | Description |
---|---|---|
options | Object |
包含以下可选参数的Object对象: |
options.imageColor | String |
修改图片 |
options.image | String | Image |
修改图片颜色 |
Example
//创建点图层:pointLayer
//添加点 :point
point.changeBillBoard({imageColor: '#a31515', image: 'xxx.jpg'});
1.2.5. point.changePoint(options)
更改基础点
Param | Type | Description |
---|---|---|
options | Object |
包含以下可选参数的Object对象: |
options.color | String |
修改颜色 |
Example
//创建点图层:pointLayer
//添加点 :point
point.changePoint({color: '#a31515'});
1.2.6. point.addPedestal(options)
更新底座特效
Param | Type | Description |
---|---|---|
options | Object |
更新选项 |
[options.speed] | Number |
pedestal配置,动画速度,选填,默认100; |
[options.color] | String |
pedestal配置,颜色,选填,默认'#F0FFFF'; |
[options.radius] | Number |
pedestal配置,特效半径,选填,默认100; |
1.2.7. point.deletePedestal()
删除底座特效
1.2.8. point.destroy()
销毁对象