@geogirafe/lib-geoportal
Version:
GeoGirafe is a flexible application to build online geoportals.
41 lines (40 loc) • 1.51 kB
TypeScript
import GroupLayer from './grouplayer';
import ThemeLayer from './themelayer';
type BaseLayerOptions = {
isDefaultChecked?: boolean;
disclaimer?: string;
metadataUrl?: string;
};
declare abstract class BaseLayer {
/**
* 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
*/
id: number;
treeItemId: string;
name: string;
order: number;
isDefaultChecked: boolean;
disclaimer?: string;
metadataUrl?: string;
isVisible: boolean;
hasError: boolean;
errorMessage: string | null;
get hasMetadata(): boolean;
abstract activeState: string;
abstract get active(): boolean;
abstract get inactive(): boolean;
abstract clone(): BaseLayer;
parent?: ThemeLayer | GroupLayer;
constructor(id: number, name: string, order: number, options?: BaseLayerOptions);
private calculateMetadataUrl;
/**
* @returns the name of the class to facilitate the identification
* of subclasses, even in Proxy objects.
*/
get className(): string;
}
export default BaseLayer;