Constructor
new EffectLabel()
Methods
addLabelCustomOptions(position, url, id, options)
- Description:
添加标签完全自定义属性
Parameters:
Name | Type | Description |
---|---|---|
position |
Cesium.Cartesian3.fromDegrees | 经纬度坐标 |
url |
string | url图标路径 |
id |
string | 标签id |
options |
object | 标签配置 |
addPoiIconLabel(position, name, url, id, horizontal, left, top)
- Description:
用于添加poi的icon和label的函数
Parameters:
Name | Type | Default | Description |
---|---|---|---|
position |
Cesium.Cartesian3.fromDegrees | 经纬度坐标 |
|
name |
string | 展示字段 |
|
url |
string | 图标路径 |
|
id |
string | 图标id |
|
horizontal |
string |
left
|
文字居中方式(left,center) |
left |
number | 文字距左侧距离 |
|
top |
number | 文字距顶部距离 |
addPoiIconLabelCustom(position, name, url, id, horizontal, rgba, padX, padY, left, top)
- Description:
用于添加poi的icon和label的函数
Parameters:
Name | Type | Default | Description |
---|---|---|---|
position |
Cesium.Cartesian3.fromDegrees | 经纬度坐标 |
|
name |
string | 展示字段 |
|
url |
string | 图标路径 |
|
id |
string | 图标id |
|
horizontal |
string |
left
|
文字居中方式(left,center) |
rgba |
Array | 文字颜色和填充颜色 |
|
padX |
number | 左边距 |
|
padY |
number | 上边距 |
|
left |
number | 文字距左侧距离 |
|
top |
number | 文字距顶部距离 |
addPoiIconLabelOutLine(position, name, url, id, horizontal, left, top)
- Description:
用于添加poi的icon和label的函数
Parameters:
Name | Type | Default | Description |
---|---|---|---|
position |
Cesium.Cartesian3.fromDegrees | 经纬度坐标 |
|
name |
string | 展示字段 |
|
url |
string | url图标路径 |
|
id |
string | 图标id |
|
horizontal |
string |
left
|
文字居中方式(left,center) |
left |
number | 文字距左侧距离 |
|
top |
number | 文字距顶部距离 |
addRegionPoiIconLabel(position, name, url, id, horizontal, left, top)
- Description:
用于添加poi的icon和label的函数
Parameters:
Name | Type | Default | Description |
---|---|---|---|
position |
Cesium.Cartesian3.fromDegrees | 经纬度坐标 |
|
name |
string | 展示字段 |
|
url |
string | 图标路径 |
|
id |
string | 图标id |
|
horizontal |
string |
left
|
文字居中方式(left,center) |
left |
number | 文字距左侧距离 |
|
top |
number | 文字距顶部距离 |
removeIconLabel(id, id2)
- Description:
从场景中删除标签
Parameters:
Name | Type | Description |
---|---|---|
id |
string | id + i (例如id为icon1,则此处为icon1i) |
id2 |
string | id + l (同上) |