Constructor
new VectorLayer(options)
Example
var vectorLayers = mainControl.vectorLayers; // 获取MainControl类中维护的矢量图层集合
// 向矢量图层集合中添加一个矢量图层
var geojsonLayer = vectorLayers.add(
new VectorLayer({
name : "GeoJson数据",
dataSource : new DataSourceGeoJson({
data : "../../../Apps/TestEarth/data/json/ne_10m_us_states.topojson",
fill : Cesium.Color.BLUE,
})
})
);
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | 拥有以下属性的对象:
Properties
|
Members
(readonly) dataSource :DataSourceVector
获取矢量图层的数据源。
Type:
(readonly) id :String
矢量图层的ID。
Type:
- String
name :String
获取或设置矢量图层的名称。
Type:
- String
show :Boolean
- Default Value:
- true
获取或设置图层是否显示。
Type:
- Boolean