@geogirafe/lib-geoportal
Version:
GeoGirafe is a flexible application to build online geoportals.
63 lines (62 loc) • 2.38 kB
TypeScript
import { GMFTreeItem } from '../gmf';
import ServerOgc from '../serverogc';
import ILayerWithLegend from './ilayerwithlegend';
import Layer from './layer';
import TileLayer from 'ol/layer/Tile';
import WMTS from 'ol/source/WMTS';
export type LayerWmtsOptions = {
isDefaultChecked?: boolean;
disclaimer?: string;
metadataUrl?: string;
opacity?: number;
protected?: boolean;
dimensions?: Record<string, object>;
imageType?: string;
style?: string;
wmsLayers?: string;
queryLayers?: string;
ogcServer?: string;
printLayers?: string;
minResolution?: number;
maxResolution?: number;
legend?: boolean;
legendImage?: string;
isLegendExpanded?: boolean;
wasLegendExpanded?: boolean;
hiDPILegendImages?: Record<string, string>;
};
declare class LayerWmts extends Layer implements ILayerWithLegend {
/**
* This class is a used in the state of the application, which will be accessed behind a javascript proxy.
* This means that each modification made to its properties must come from outside,
* because they have to be made through the proxy, so that the modification can be listen.
* Therefore, this class must not contain any method which is updating a value directly
* For example, any method doing <this.xxx = value> is forbidden here, because the modification be known from the proxy
*/
url: string;
layer: string;
dimensions?: Record<string, object>;
imageType?: string;
style?: string;
minResolution?: number;
maxResolution?: number;
legend: boolean;
legendImage?: string;
isLegendExpanded: boolean;
wasLegendExpanded: boolean;
ogcServer?: ServerOgc;
wmsLayers?: string;
queryLayers?: string;
printLayers?: string;
hiDPILegendImages?: Record<string, string>;
/** Linked ol layer, starting with an underscore to not be part of the proxy. **/
_olayer?: TileLayer<WMTS>;
constructor(id: number, name: string, order: number, url: string, layer: string, options?: GMFTreeItem | LayerWmtsOptions, ogcServer?: ServerOgc);
clone(): LayerWmts;
get layerUniqueId(): string;
hasRestrictedResolution(): boolean | 0 | undefined;
isVisibleAtResolution(resolution: number): boolean;
private static isGMFTreeItem;
private static getOptionsFromGMFTreeItem;
}
export default LayerWmts;