projects/angular-cesium/src/lib/angular-cesium/services/drawers/static-dynamic/static-primitive-drawer/static-primitive-drawer.service.ts
This drawer is deprecated. General static primitives drawer responsible of drawing static Cesium primitives with material.
Properties |
|
Methods |
constructor(geometryType: any, cesiumService: CesiumService)
|
|||||||||
Parameters :
|
Protected _cesiumCollection |
Type : any
|
Inherited from
PrimitivesDrawerService
|
Defined in
PrimitivesDrawerService:12
|
Private _primitiveCollectionWrap |
Type : any
|
Inherited from
PrimitivesDrawerService
|
Defined in
PrimitivesDrawerService:11
|
Protected _propsAssigner |
Type : Function
|
Inherited from
BasicDrawerService
|
Defined in
BasicDrawerService:13
|
Private _show |
Default value : true
|
Inherited from
PrimitivesDrawerService
|
Defined in
PrimitivesDrawerService:10
|
add |
add(geometryProps: any, instanceProps: any, primitiveProps: any)
|
Inherited from
BasicDrawerService
|
Defined in
BasicDrawerService:15
|
Returns :
any
|
update | |||||||||||||||
update(primitive: any, geometryProps: any, instanceProps: any, primitiveProps: any)
|
|||||||||||||||
Inherited from
BasicDrawerService
|
|||||||||||||||
Defined in
BasicDrawerService:26
|
|||||||||||||||
Parameters :
Returns :
any
|
getShow |
getShow()
|
Inherited from
PrimitivesDrawerService
|
Defined in
PrimitivesDrawerService:51
|
Returns :
boolean
|
init |
init()
|
Inherited from
BasicDrawerService
|
Defined in
BasicDrawerService:19
|
Returns :
void
|
remove | ||||||
remove(entity: any)
|
||||||
Inherited from
BasicDrawerService
|
||||||
Defined in
BasicDrawerService:38
|
||||||
Parameters :
Returns :
void
|
removeAll |
removeAll()
|
Inherited from
BasicDrawerService
|
Defined in
BasicDrawerService:42
|
Returns :
void
|
setShow | ||||||
setShow(showValue: boolean)
|
||||||
Inherited from
BasicDrawerService
|
||||||
Defined in
BasicDrawerService:46
|
||||||
Parameters :
Returns :
void
|
setPropsAssigner | ||||||
setPropsAssigner(assigner: Function)
|
||||||
Inherited from
BasicDrawerService
|
||||||
Defined in
BasicDrawerService:23
|
||||||
Parameters :
Returns :
void
|
import { PrimitiveCollection, GeometryInstance, Primitive } from 'cesium';
import { PrimitivesDrawerService } from '../../primitives-drawer/primitives-drawer.service';
import { CesiumService } from '../../../cesium/cesium.service';
/**
*
* This drawer is deprecated.
* General static primitives drawer responsible of drawing static Cesium primitives with material.
*/
export abstract class StaticPrimitiveDrawer extends PrimitivesDrawerService {
constructor(private geometryType: any, cesiumService: CesiumService) {
super(PrimitiveCollection, cesiumService);
}
add(geometryProps: any, instanceProps: any, primitiveProps: any): any {
if (Object.keys(instanceProps).length === 0) {
throw(new Error('instanceProps object is empty'));
}
instanceProps.geometry = new this.geometryType(geometryProps);
primitiveProps.geometryInstances = new GeometryInstance(instanceProps);
primitiveProps.asynchronous = false;
const primitive = new Primitive(primitiveProps);
return super.add(primitive);
}
update(primitive: any, geometryProps: any, instanceProps: any, primitiveProps: any) {
instanceProps.geometry = new this.geometryType(geometryProps);
primitiveProps.geometryInstances = new GeometryInstance(instanceProps);
this._cesiumCollection.remove(primitive);
return super.add(new Primitive(primitiveProps));
}
}