export default Map; export type MarkerOptions = { position?: [number, number]; icon?: string; }; export type MapOptions = { div: string; center: import("ol/coordinate").Coordinate; zoom?: number; showCoords?: boolean; addMiniMap?: boolean; miniMapExpanded?: boolean; addLayerSwitcher?: boolean; searchDiv?: boolean; layers?: string[]; backgroundLayers?: string[]; }; /** * Attr is ['title', 'description'] by default */ export type CustomLayer = { attr?: string[]; success?: () => void; error?: () => void; }; /** * @private * @hidden */ declare class Map { /** * @param {MapOptions} options API options. */ constructor(options: MapOptions); /** * @private * @type {View} */ private view_; /** * @private * @type {OLMap} */ private map_; /** * @private * @type {Overlay} */ private overlay_; /** * @private * @type {VectorSource} */ private vectorSource_; /** * @private * @type {VectorLayer>} */ private vectorLayer_; selectInteraction_: SelectInteraction; /** * @private * @returns {HTMLElement} overlay container element. */ private createOverlayDomTree_; /** * @returns {OLMap} */ getMap(): OLMap; /** * @param {import('ol/coordinate').Coordinate} center Center. * @param {number} zoom Zoom. */ recenter(center: import("ol/coordinate").Coordinate, zoom: number): void; /** * @param {MarkerOptions} options Options. */ addMarker(options?: MarkerOptions): void; /** * @param {string} layer Name of the layer to fetch the features from * @param {string[]} ids List of ids * @param {boolean} [highlight=false] Whether to add the features on the map or not. */ recenterOnObjects(layer: string, ids: string[], highlight?: boolean): void; /** * @param {string} type Layer type, only 'text' format is supported. * @param {string} name Name. * @param {string} url URL. * @param {CustomLayer} [options] Options */ addCustomLayer(type: string, name: string, url: string, options?: CustomLayer): void; /** * @param {string|number} id Identifier. * @param {import('ol/coordinate').Coordinate} position * @param {boolean} table Display all properties in a table */ selectObject(id: string | number, position?: import("ol/coordinate").Coordinate, table?: boolean): void; /** * */ clearSelection(): void; } import SelectInteraction from 'ol/interaction/Select'; import OLMap from 'ol/Map';