瀏覽代碼

improve PrimitiveLayer

tags/2.2.3
Caven Chen 4 年之前
父節點
當前提交
bedf5a0c4d
共有 1 個檔案被更改,包括 20 行新增0 行删除
  1. 20
    0
      modules/layer/type/PrimitiveLayer.js

+ 20
- 0
modules/layer/type/PrimitiveLayer.js 查看文件

constructor(id) { constructor(id) {
super(id) super(id)
this._delegate = new Cesium.PrimitiveCollection() this._delegate = new Cesium.PrimitiveCollection()
this._points = this._delegate.add(new Cesium.PointPrimitiveCollection())
this._lalbes = this._delegate.add(new Cesium.LabelCollection())
this._billboards = this._delegate.add(new Cesium.BillboardCollection())
this._polylines = this._delegate.add(new Cesium.PolylineCollection())
this.type = Layer.getLayerType('primitive') this.type = Layer.getLayerType('primitive')
this._state = State.INITIALIZED this._state = State.INITIALIZED
} }


get points() {
return this._points
}

get lalbes() {
return this._lalbes
}

get billboards() {
return this._billboards
}

get polylines() {
return this._polylines
}

/** /**
* Clears all primitives * Clears all primitives
* @returns {PrimitiveLayer} * @returns {PrimitiveLayer}

Loading…
取消
儲存