projects/angular-cesium/src/lib/angular-cesium-widgets/models/edit-point.ts
Properties |
|
Methods |
Accessors |
constructor(entityId: string, position: Cartesian3, pointProps?: PointProps, virtualPoint)
|
|||||||||||||||
Parameters :
|
Private _show |
_show:
|
Default value : true
|
Private _virtualEditPoint |
_virtualEditPoint:
|
Type : boolean
|
Static counter |
counter:
|
Type : number
|
Default value : 0
|
Private editedEntityId |
editedEntityId:
|
Type : string
|
Private id |
id:
|
Type : string
|
Private pointProps |
pointProps:
|
Type : PointProps
|
Private position |
position:
|
Type : Cartesian3
|
Private generateId |
generateId()
|
Returns :
string
|
getEditedEntityId |
getEditedEntityId()
|
Returns :
string
|
getId |
getId()
|
Returns :
string
|
getPosition |
getPosition()
|
Returns :
Cartesian3
|
getPositionCallbackProperty |
getPositionCallbackProperty()
|
Returns :
Cartesian3
|
isVirtualEditPoint |
isVirtualEditPoint()
|
Returns :
boolean
|
setPosition | ||||||
setPosition(position: Cartesian3)
|
||||||
Parameters :
Returns :
void
|
setVirtualEditPoint | ||||||
setVirtualEditPoint(value: boolean)
|
||||||
Parameters :
Returns :
void
|
Static create | ||||||||
create(json?: any)
|
||||||||
Inherited from
AcEntity
|
||||||||
Defined in AcEntity:18
|
||||||||
Creates entity from a json
Parameters :
Returns :
any
entity as AcEntity |
show | ||||
getshow()
|
||||
setshow(value)
|
||||
Parameters :
Returns :
void
|
props | ||||
getprops()
|
||||
setprops(value)
|
||||
Parameters :
Returns :
void
|
import { AcEntity } from '../../angular-cesium/models/ac-entity';
import { Cartesian3 } from '../../angular-cesium/models/cartesian3';
import { PointProps } from './point-edit-options';
export class EditPoint extends AcEntity {
static counter = 0;
private id: string;
private editedEntityId: string;
private position: Cartesian3;
private _virtualEditPoint: boolean;
private pointProps: PointProps;
private _show = true;
constructor(entityId: string, position: Cartesian3, pointProps?: PointProps, virtualPoint = false) {
super();
this.editedEntityId = entityId;
this.position = position;
this.id = this.generateId();
this.pointProps = {...pointProps};
this._virtualEditPoint = virtualPoint;
}
get show() {
return this._show;
}
set show(value) {
this._show = value;
}
get props(): PointProps {
return this.pointProps;
}
set props(value: PointProps) {
this.pointProps = value;
}
isVirtualEditPoint(): boolean {
return this._virtualEditPoint;
}
setVirtualEditPoint(value: boolean) {
this._virtualEditPoint = value;
}
getEditedEntityId(): string {
return this.editedEntityId;
}
getPosition(): Cartesian3 {
return this.position.clone();
}
getPositionCallbackProperty(): Cartesian3 {
return new Cesium.CallbackProperty(this.getPosition.bind(this), false);
}
setPosition(position: Cartesian3) {
this.position.x = position.x;
this.position.y = position.y;
this.position.z = position.z;
}
getId(): string {
return this.id;
}
private generateId(): string {
return 'edit-point-' + EditPoint.counter++;
}
}