cong-gis-viewer
Version:
The minimal recommended setup for an app using Cesium with Webpack 5
166 lines (165 loc) • 5.98 kB
TypeScript
import "cesium/Build/Cesium/Widgets/widgets.css";
import "./css/main.css";
import "./index.css";
export declare class ViewCesium {
viewer: any;
handler: any;
/**
* Hàm khởi tạo view Cesium
* @param {string} containerId ID chứa canvas view
* @param {string} token token *
*/
initCesiumViewer: (containerId: string, token: string) => Promise<any>;
load3DTileUrl: (path: string) => Promise<any>;
entityIdCounter: number;
activeShapePoints: any;
tempShapePoint: any[];
tempLabel: any[];
activeShape: any;
floatingPoint: any;
currentPointClick: any;
activeEntities: any;
currentLabelDim: any;
isClickListenerMouseEnabled: any;
pointXMark: any;
/**
* Hàm khởi tạo Dim
*/
dimensionCesium: () => void;
/**
* Sự kiện hủy khi ấn chuột phải
*/
terminateDim: () => void;
/**
* Vẽ shape tại Move chuột
* */
drawShape(positionData: any): any;
/**
* Sau kết thúc DIM vẽ lần lượt lại DIM để gán được các ID
* @param {[]} activeShapePoints list point để vẽ lại đường Line khi hoàn thành
*/
drawFinishDim: (activeShapePoints: any[]) => void;
/**
* Hàm tạo các point line labe cho đường DIM tổng thể
*
*/
createDimensionObjects: (startPoint: any, endPoint: any, entityIdBase: any, disableDepthEndPoint?: boolean) => {
lineHypotenuse: any;
lineVertical: any;
lineHorizontal: any;
labelHypotenuse: any;
labelVertical: any;
labelHorizontal: any;
startDot: any;
endDot: any;
thirdDot: any;
};
createPointDim: (worldPosition: any, inputId: any, clamGound: boolean, disableDepth?: boolean) => any;
createPolylinePrimitive: (startPoint: any, endPoint: any, entityIdBase: any, color: any) => any;
createLabelForDimension: (startPoint: any, endPoint: any, distance: any, inputId: any) => any;
handleDocumentEvents: (event: any) => void;
createXmark: (position: any) => any;
removeDimCesium: () => void;
removeAllEvents: () => void;
deleteEntityByPrefix: (entityIdBase: any, objEntities: any) => void;
removeAllDimensionCesium: () => void;
showHideAllDimensionCesium: (showEntity: any) => void;
showHideDimension: (entityIdBase: any, showEntity: boolean) => void;
refreshAllAction: () => void;
entityIdCounterPosition: number;
activeCreatePointXYZ: boolean;
activePointXYZEntities: any;
lastPoint: any;
getWGS84ToVN2000: (epsg: any, longitude: any, latitude: any, height: any) => Promise<any>;
createPointXYZCesium: (epsg: any) => void;
removePointXYZCesium: () => void;
removeAllPointXYZs: () => void;
showHideAllPointXYZs: (show: boolean) => void;
formatCoordinatesXYZ: (x: any, y: any, z: any) => {
x: any;
y: any;
z: any;
};
pointCurrentLocationWeb: any;
flyToCurrentLocation: () => Promise<unknown>;
longitudeHomeLocation: number;
latitudeHomeLocation: number;
heightHomeLocation: number;
flyToHomeLocation: () => void;
buttonDimGroup: ({
id: string;
tooltip: string;
icon: string;
} | {
id: string;
tooltip: string;
icon: () => string;
})[];
buttonPointGroup: ({
id: string;
tooltip: string;
icon?: undefined;
} | {
id: string;
tooltip: string;
icon: () => string;
})[];
createToolbar: (containerId: string) => void;
/**
* Hàm xử lý hành động cho ruler-tool
* @param {string} idTarget ID của thẻ
* @param {string} idElement ID hành động của nút *
*/
ToolBarActionDim: (idTarget: string, idElement: string) => void;
espChoose: number;
/**
* Hàm xử lý hành động cho ruler-tool
* @param {string} idTarget ID của thẻ
* @param {string} idElement ID hành động của nút *
*/
ToolBarActionPoint: (idTarget: string, idElement: string) => void;
/**
* Hàm ẩn hiện element theo ID
* @param {string} idElement ID của thẻ
* @param {string} showElement true = show, hide = false
*/
showHideElementByID: (idElement: string, showElement: boolean) => void;
showHideAllToolBarGroup: (idTarget: string, show: boolean, groupButton: any) => void;
/**
* Hàm acive button theo ID và group toolbar
* @param {string} idTarget ID của thẻ chứa canvas view
* @param {string} idElement ID của thẻ
* @param {[]} arrayBtn arr của chứa button đó để tiện sử dụng
*/
activateButton: (idElement: string, idTarget: string, arrayBtn: any[]) => void;
activeBtnModel: boolean;
private onModelChangeCallback;
activeBtnModelProxy: {
value: boolean;
};
private setActiveBtnModel;
private handleModelChange;
onLayerModelChange(callback: (value: boolean) => void): void;
/**
* Hàm active button layer để dùng hiển thị model
* @param {boolean} activeBtnModel biến toàn cục để lưu lại
* @param {string} idElement ID của thẻ
* @return {boolean} trả về true/false tương ứng active hay không
*/
mapModel: (idElement: string) => boolean;
/**
* Hàm có bật nút layer model
* @param {boolean} toggleBtn bật/tắt nút
* @param {string} idElement ID của thẻ cha chứa tất cả
*/
activeBtnMapModel: (toggleBtn: boolean, IdElement: string) => void;
tooltip: HTMLDivElement | null;
currentTooltipTarget: HTMLElement | null;
timeoutId: number | null;
showTooltip: (target: HTMLElement) => void;
hideTooltip: () => void;
handleMouseEnter: (event: MouseEvent, delay?: number) => void;
handleMouseLeave: (event: MouseEvent) => void;
constructor();
createUUID: () => string;
}