Constructor
new Geojson(viewer)
- Description:
构造函数
- Source:
Parameters:
Name | Type | Description |
---|---|---|
viewer |
Object | 地图场景对象 |
Methods
(async) add(urlopt, idopt, typeopt, optionsopt) → {Promise.<(Entity|Primitive)>}
- Description:
加载geojson
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
url |
String |
<optional> |
json地址 |
|
id |
String |
<optional> |
加载后图层id |
|
type |
String |
<optional> |
加载类型,1-entity,2-primitive |
|
options |
BillboardOption | PolylineOption | PolygonOption |
<optional> |
null
|
图层参数设置,根据加载图层的几何类型,自主选择,点:BillboardOption,线:PolylineOption,面:PolygonOption |
Returns:
- 异步返回,加载后图层对象,Entity类或Primitive类对象,参考Cesium
- Type
- Promise.<(Entity|Primitive)>