projects/angular-cesium/src/lib/angular-cesium/services/ac-html-manager/ac-html-manager.service.ts
Properties |
|
Methods |
constructor()
|
addOrUpdate | |||||||||
addOrUpdate(id: any, info: literal type)
|
|||||||||
Parameters :
Returns :
void
|
forEach | ||||||
forEach(callback: any)
|
||||||
Parameters :
Returns :
void
|
get | ||||||
get(id: string)
|
||||||
Parameters :
Returns :
literal type
|
has | ||||||
has(id: string)
|
||||||
Parameters :
Returns :
boolean
|
remove | ||||||
remove(id: string)
|
||||||
Parameters :
Returns :
void
|
Private _entities |
_entities:
|
Type : Map<any | any>
|
import { Injectable } from '@angular/core';
@Injectable()
export class AcHtmlManager {
private _entities: Map<any, any>;
constructor() {
this._entities = new Map<any, any>();
}
has(id: string): boolean {
return this._entities.has(id);
}
get(id: string): { entity: any, primitive: any } {
return this._entities.get(id);
}
addOrUpdate(id: any, info: { entity: any, primitive: any }) {
this._entities.set(id, info);
}
remove(id: string) {
this._entities.delete(id);
}
forEach(callback: any) {
this._entities.forEach(callback);
}
}