几何图形构造函数
Name | Type | Description |
---|---|---|
viewer |
Viewer | Cesium视图 |
dataSource |
DataSource | 数据源,几何对象会被添加入其中 |
Methods
addBuffer(positions, leftBuffer, rightBuffer, dataSource, lineEntity, polylineGraphic, polygonGraphics, option, viewer)
绘制缓冲区
Name | Type | Description |
---|---|---|
positions |
Array.<Cartesian3> | 中心点点位 |
leftBuffer |
number | 左侧缓冲区范围 |
rightBuffer |
number | 右侧缓冲区范围 |
dataSource |
CustomDataSource | 数据源 |
lineEntity |
Entity | 线实体对象 |
polylineGraphic |
object | 线样式 |
polygonGraphics |
object | 面样式 |
option |
object | |
viewer |
viewer |
addBuffer(positions, leftBuffer, rightBuffer, dataSource, lineEntity, polylineGraphic, polygonGraphics, option, viewer)
绘制缓冲区
Name | Type | Description |
---|---|---|
positions |
Array.<Cartesian3> | 中心点点位 |
leftBuffer |
number | 左侧缓冲区范围 |
rightBuffer |
number | 右侧缓冲区范围 |
dataSource |
CustomDataSource | 数据源 |
lineEntity |
Entity | 线实体对象 |
polylineGraphic |
object | 线样式 |
polygonGraphics |
object | 面样式 |
option |
object | |
viewer |
viewer |
添加单个圆形区域
Name | Type | Description |
---|---|---|
positions |
Array.<number> | 点坐标[lan,lon,alt] |
radius |
* | 半径 |
option |
* |
添加单个圆形区域
Name | Type | Description |
---|---|---|
positions |
Array.<number> | 点坐标[lan,lon,alt] |
radius |
* | 半径 |
option |
* |
添加单点
Name | Type | Description |
---|---|---|
positions |
Array.<number> | 点坐标[lan,lon,alt] |
option |
PointGraphics.ConstructorOptions | 点样式 |
properties |
Object | PropertyBag | entity的属性 |
Returns:
成功添加的点id
添加单点
Name | Type | Description |
---|---|---|
positions |
Array.<number> | 点坐标[lan,lon,alt] |
option |
PointGraphics.ConstructorOptions | 点样式 |
properties |
Object | PropertyBag | entity的属性 |
Returns:
成功添加的点id
添加单个二维面
Name | Type | Default | Description |
---|---|---|---|
positions |
Array.<Array.<number>> |
二维坐标集合,其中第一个Array |
|
polygonGraphics |
PolygonGraphics.ConstructorOptions | 面样式 | |
properties |
Object | PropertyBag | entity的属性 | |
show |
boolean |
true
|
添加后是否显示 |
flyTo |
boolean |
false
|
添加后是否将视图飞到目标 |
Returns:
成功添加的面id
添加单个二维面
Name | Type | Default | Description |
---|---|---|---|
positions |
Array.<Array.<number>> |
二维坐标集合,其中第一个Array |
|
polygonGraphics |
PolygonGraphics.ConstructorOptions | 面样式 | |
properties |
Object | PropertyBag | entity的属性 | |
show |
boolean |
true
|
添加后是否显示 |
flyTo |
boolean |
false
|
添加后是否将视图飞到目标 |
Returns:
成功添加的面id
添加线
Name | Type | Description |
---|---|---|
positions |
Array.<Array.<number>> | 点坐标集[[lan,lon,alt]] |
option |
PolylineGraphics.ConstructorOptions | 线样式 |
properties |
Object | PropertyBag | entity的属性 |
show |
boolean | 添加后是否显示 |
flyTo |
boolean | 添加后是否将视图飞到目标 |
Returns:
成功添加的线id
添加线
Name | Type | Description |
---|---|---|
positions |
Array.<Array.<number>> | 点坐标集[[lan,lon,alt]] |
option |
PolylineGraphics.ConstructorOptions | 线样式 |
properties |
Object | PropertyBag | entity的属性 |
show |
boolean | 添加后是否显示 |
flyTo |
boolean | 添加后是否将视图飞到目标 |
Returns:
成功添加的线id
添加线
Name | Type | Description |
---|---|---|
positions |
Array.<Array.<number>> | 点坐标集[[lan,lon,alt]] |
option |
PolylineGraphics.ConstructorOptions | 线样式 |
properties |
Object | PropertyBag | entity的属性 |
show |
boolean | 添加后是否显示 |
flyTo |
boolean | 添加后是否将视图飞到目标 |
Returns:
成功添加的线id
添加线
Name | Type | Description |
---|---|---|
positions |
Array.<Array.<number>> | 点坐标集[[lan,lon,alt]] |
option |
PolylineGraphics.ConstructorOptions | 线样式 |
properties |
Object | PropertyBag | entity的属性 |
show |
boolean | 添加后是否显示 |
flyTo |
boolean | 添加后是否将视图飞到目标 |
Returns:
成功添加的线id
相机视角设置到某个几何图形
Name | Type | Description |
---|---|---|
id |
id | 目标图形id |
相机视角设置到某个几何图形
Name | Type | Description |
---|---|---|
id |
id | 目标图形id |
隐藏所有标注
Name | Type | Description |
---|---|---|
ids |
Array.<string> | 要隐藏标注的id数组,没有时隐藏所有 |
隐藏所有标注
Name | Type | Description |
---|---|---|
ids |
Array.<string> | 要隐藏标注的id数组,没有时隐藏所有 |
删除标记
Name | Type | Description |
---|---|---|
ids |
Array.<string> | 要删除标注的id数组,没有时删除所有 |
Returns:
删除标记数组,成功删除status值为true, 否则为false
删除标记
Name | Type | Description |
---|---|---|
ids |
Array.<string> | 要删除标注的id数组,没有时删除所有 |
Returns:
删除标记数组,成功删除status值为true, 否则为false
显示所有标注
Name | Type | Description |
---|---|---|
ids |
Array.<string> | 要显示标注的id数组,没有时显示所有 |
显示所有标注
Name | Type | Description |
---|---|---|
ids |
Array.<string> | 要显示标注的id数组,没有时显示所有 |
更新标记
Name | Type | Description |
---|---|---|
id |
string | 要更新的标记id |
position |
Array.<number> | 更新后的位置坐标 |
option |
BillboardGraphics.ConstructorOptions | 更新后的样式属性 |
更新标记
Name | Type | Description |
---|---|---|
id |
string | 要更新的标记id |
position |
Array.<number> | 更新后的位置坐标 |
option |
BillboardGraphics.ConstructorOptions | 更新后的样式属性 |