UNPKG

@igo2/geo

Version:
71 lines (70 loc) 2.9 kB
import { ConfigService } from '@igo2/core/config'; import { StorageService } from '@igo2/core/storage'; import { SubjectStatus } from '@igo2/utils'; import olMap from 'ol/Map'; import * as olproj from 'ol/proj'; import OlProjection from 'ol/proj/Projection'; import { BehaviorSubject, Subject } from 'rxjs'; import { FeatureDataSource } from '../../datasource/shared/datasources/feature-datasource'; import { LayerController } from '../../layer'; import type { AnyLayer, Layer } from '../../layer/shared/layers'; import { Overlay } from '../../overlay/shared/overlay'; import { LayerWatcher, LayerWatcherChange } from '../utils/layer-watcher'; import { MapGeolocationController } from './controllers/geolocation'; import { MapViewController } from './controllers/view'; import type { MapBase } from './map.abstract'; import { MapControlsOptions, MapExtent, MapOptions, MapViewOptions } from './map.interface'; export declare class IgoMap implements MapBase { private storageService?; private configService?; ol: olMap; forcedOffline$: BehaviorSubject<boolean>; layersAddedByClick$: BehaviorSubject<AnyLayer[]>; status$: Subject<SubjectStatus>; propertyChange$: Subject<LayerWatcherChange>; overlay: Overlay; queryResultsOverlay: Overlay; searchResultsOverlay: Overlay; viewController: MapViewController; layerController: LayerController; geolocationController: MapGeolocationController; swipeEnabled$: BehaviorSubject<boolean>; mapCenter$: BehaviorSubject<boolean>; selectedFeatures$: BehaviorSubject<Layer[]>; bufferDataSource: FeatureDataSource; layerWatcher: LayerWatcher; readonly options: MapOptions; private mapViewOptions; private defaultOptions; /** @deprecated use projectionCode */ get projection(): string; get viewProjection(): olproj.Projection; get projectionCode(): string; constructor(options?: MapOptions, storageService?: StorageService, configService?: ConfigService); init(): void; setTarget(id: string): void; updateView(options: MapViewOptions): void; /** * Set the map view * @param options Map view options */ setView(options: MapViewOptions): void; updateControls(value: MapControlsOptions): void; /** * @deprecated * TODO: Move to ViewController and update every place it's used */ getCenter(projection?: string | OlProjection): [number, number]; /** * @deprecated * TODO: Move to ViewController and update every place it's used */ getExtent(projection?: string | OlProjection): MapExtent; /** * @deprecated * TODO: Move to ViewController and update every place it's used */ getZoom(): number; /** @deprecated find a way to remove this method. For now we discourage to use it until we find the way to remove it */ getLayerByOlUId(olUId: string): AnyLayer; }