import Krite from './krite'; import Evented from './util/evented'; import { CRS, LatLng, LatLngBounds, Layer, Point, TileLayerOptions } from 'leaflet'; export interface ILayer { hasOperations?: boolean; hasOnClick?: boolean; title: string; name: string; abstract: string; bounds: LatLngBounds | undefined; preview: string; leaflet: T; legend: string; minZoom?: number; maxZoom?: number; zIndex?: number; added?(krite: Krite): void; intersects?(feature: GeoJSON.Feature | GeoJSON.GeometryObject): Promise>; intersectsPoint?(point: Point): Promise>; filter?(options: { id?: string; filters?: { [index: string]: string | number | null; }; properties?: string[]; }): Promise>; getType?(attr: string): TAttributes | IAttributeTypeFunc; } export interface ILayerEvented extends ILayer, Evented { } export interface IBasemap { preview: string; url: string; options: TileLayerOptions; } export interface IDataSource { added?(krite: Krite): void; getLayerNames(): Promise; getLayer(name: string): Promise; } export declare type TAttributes = 'skip' | 'string' | 'float' | 'int' | 'percentage' | 'href'; export declare type IAttributeTypeFunc = (attr: any) => string; export interface IService { added?(krite: Krite): void; [propName: string]: any; } export interface ICRS { identifiers: { leaflet: string; krite: string; }; crs: CRS; geoTo(geojson: any): any; geoFrom(geojson: any): any; pointTo(point: Point): LatLng; pointFrom(latLng: LatLng): Point; } export interface IProjectionService extends IService { identifiers: { leaflet: string; krite: string; }; geoTo(geojson: any): any; geoFrom(geojson: any): any; pointTo(point: Point): LatLng; pointFrom(latLng: LatLng): Point; project(latLng: LatLng): Point; unproject(point: Point): LatLng; }