UNPKG

ngx-gaia-gis

Version:

GaiaGisService is an Angular library that simplifies the integration of interactive maps using OpenLayers. It allows for visualizing raster maps, adding custom points, and adjusting views easily, making it ideal for developers who need to implement geospa

66 lines (65 loc) 2.62 kB
import 'ol/ol.css'; import { Option } from '../interfaces'; import { PointGaia } from '../interfaces/PointGaia.model'; import * as i0 from "@angular/core"; export declare class GaiaGisService { private map; private labels; private rasterLayers; private pointLayer; private popup; constructor(); /** * Initializes the map with the specified target, center, zoom level, and design. * @param {string} target - The target element ID for the map. * @param {Object} options - Options for configuring the map. * @param {[number, number]} [options.center=[0, 0]] - The initial center of the map. * @param {number} [options.zoom=2] - The initial zoom level of the map. * @param {string} [options.design=MapsDesign.CARTOCDN] - The design of the map. */ initializeMap(target: string, options?: Option): void; /** * Initializes the popup overlay for the map. */ private initializePopup; /** * Adds a raster layer to the map using a given URL. * @param {string} url - The URL of the GeoTIFF file. * @returns {Promise<void>} */ addRasterLayer(url: string): Promise<void>; /** * Creates a tiles URL for the given encoded URL. * @param {string} url - The encoded URL of the GeoTIFF file. * @returns {string} - The tiles URL. */ private createTilesUrl; /** * Removes a raster layer from the map by its index. * @param {number} index - The index of the raster layer to remove. */ removeRasterLayer(index: number): void; /** * Sets the view of the map to a given center and zoom level. * @param {[number, number]} center - The new center of the map. * @param {number} zoom - The new zoom level of the map. */ setView(center: [number, number], zoom: number): void; /** * Zooms the map to fit a given extent. * @param {[number, number, number, number]} extent - The extent to fit the map to. */ zoomToExtent(extent: [number, number, number, number]): void; /** * Adds a list of points to the map with an optional icon. * @param {Array<{ coords: [number, number], info?: string }>} points - The list of points to add to the map. * @param {string} [iconUrl] - The URL of the icon to use for the points. */ addPoints(points: PointGaia[], iconUrl?: string): void; /** * Exports the current map view to a PDF file. */ exportGaiaMapToPdf(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GaiaGisService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<GaiaGisService>; }