@geogirafe/lib-geoportal
Version:
GeoGirafe is a flexible application to build online geoportals.
43 lines (42 loc) • 1.61 kB
TypeScript
import IGirafeContext from '../../../tools/context/icontext.js';
import BaseLayer from '../../../models/layers/baselayer.js';
import LayerWms from '../../../models/layers/layerwms.js';
import Basemap from '../../../models/basemaps/basemap.js';
import { CameraConfig } from '../../../tools/state/globe.js';
declare global {
interface Window {
Cesium: unknown;
}
}
/**
* The 3D Globe, based on Cesium and synchronized with the OpenLayers map by OLCesium.
*
* This module is the only place where Cesium and OLCesium are used. It is loaded on demand
* by the map-3d Component, so that those (heavy) libraries stay out of the initial bundle
* as long as the 3D Map is not displayed.
*/
export default class Globe {
private readonly context;
private readonly toolName;
private readonly pixelTolerance;
olCesium: any;
private scene;
private wmsManager3d;
private get state();
private get config();
constructor(context: IGirafeContext, toolName: string, pixelTolerance: number);
/**
* Loads Cesium and OLCesium and initializes the globe on the given target element.
*/
initialize(target: HTMLDivElement): Promise<void>;
private registerSelection;
setEnabled(enabled: boolean): void;
setShadows(shadows: boolean): void;
setCamera(camera: CameraConfig | null): void;
private addAllActiveLayers;
onLayerToggled(layer: LayerWms): void;
changeOpacity(layer: BaseLayer): void;
changeBasemapOpacity(basemap: Basemap): void;
changeFilter(layer: LayerWms): void;
onChangeBasemaps(basemaps: Basemap[]): void;
}