import { HsLogService } from 'hslayers-ng/services/log'; import { HsMapService } from 'hslayers-ng/services/map'; import * as i0 from '@angular/core'; import { Subject } from 'rxjs'; import { HsConfig } from 'hslayers-ng/config'; import { HsEventBusService } from 'hslayers-ng/services/event-bus'; import { HsLanguageService } from 'hslayers-ng/services/language'; import { HsLayoutService } from 'hslayers-ng/services/layout'; import { MapComposition } from 'hslayers-ng/types'; declare class HsShareThumbnailService { hsMapService: HsMapService; hsLogService: HsLogService; private hsConfig; private readonly THUMBNAIL_SIZE; private readonly SCALE_FACTOR; private renderer; constructor(); setCanvasSize(canvas: any, width: number, height: number): void; setupContext(ctx: any): void; rendered($element: any, newRender?: any): string; private isCanvasTainted; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsShareUrlService { hsMapService: HsMapService; hsConfig: HsConfig; hsLanguageService: HsLanguageService; hsLayoutService: HsLayoutService; hsEventBusService: HsEventBusService; private location; private zone; private platformLocation; private httpClient; private hsProxyService; private destroyRef; current_url: string; params: {}; customParams: {}; updateDebouncer: {}; url_generation: boolean; paramTimer: any; shareId: any; permalinkRequestUrl: string; id: any; urlUntilParams: string; param_string: string; statusSaving: boolean; data: MapComposition; browserUrlUpdated: Subject; constructor(); /** * Update map view with values from URL */ private panToUrlCoords; private keepTrackOfGetParams; /** * Get HSL server share service endpoint's url */ endpointUrl(): string; /** * Updates permalink composition. Used without data prop to update extent of the composition * @param data - Map composition data */ updatePermalinkComposition(data?: MapComposition): Promise; /** * Get actual map state information (visible layers, added layers*, active panel, map center and zoom level), create full Url link and push it in Url bar. (*Added layers are omitted from permalink url). */ update(): void; /** * Update URL params when single HSL app is bootstrapped */ private updateURL; /** * Updates URL params related to map view * @param standalone - True if called outside of 'update' */ private updateViewParamsInUrl; /** * Create permalink URL to map * @returns Permalink URL */ getPermalinkUrl(): string; private pathName; /** * @param url - URL to shorten * @returns Shortened URL * Promise which shortens URL by using some URL shortener. * By default tinyurl is used, but user provided function in config.shortenUrl can be used. * @example * ```typescript * function(url) { return new Promise(function(resolve, reject){ $http.get("http://tinyurl.com/api-create.php?url=" + url, { longUrl: url }).then(function(response) { resolve(response.data); }).catch(function(err) { reject() }) }) } * ``` */ shortUrl(url: string): Promise; /** * Create URL for PureMap version of map * @returns Embedded URL */ getPureMapUrl(): string; /** * Parse parameter string from URL into key-value(s) pairs * @param str - Parameter string to parse * @returns Parsed parameter object */ parse(str: string): {}; /** * Create encoded parameter string from parameter object * @param obj - Parameter object to stringify * @returns Encoded parameter string or "" if no parameter object is given */ stringify(obj: any): string; /** * Push new key-value pair into parameter object and update Url string with new params * @param key - Key name for pushed parameter * @param new_value - Value for pushed parameter */ push(key: any, new_value: any): void; /** * Returns param value and removes custom param when it is called * @param param - Param to get current value and remove */ getParamValAndRemove(param: string): string; /** * Find current param value from URL * @param param - Param to get current value * @returns Current value for requested param or null if param doesn't exist */ getParamValue(param: string): string; getParamValues(keys: string[]): any; /** * Update values for custom parameters which get added to the url and usually are application specific * @param params - A dictionary of custom parameters which get added to the generated URL */ updateCustomParams(params: any): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * List of GET parameters set and read by Hslayers */ declare const HS_PRMS: { x: string; y: string; zoom: string; visibleLayers: string; panel: string; lang: string; pureMap: string; view: string; permalink: string; composition: string; search: string; layerSelected: string; hsWmsToConnect: string; hsWfsToConnect: string; hsWmtsToConnect: string; hsKmlToConnect: string; hsGeojsonToConnect: string; hsArcgisToConnect: string; hsWmsLayers: string; hsWfsLayers: string; hsWmtsLayers: string; hsKmlLayers: string; hsGeojsonLayers: string; hsArcgisLayers: string; }; /** * If we cant find GET param from HS_PRMS, search in old parameters list before renaming. * NOTE: It's important that values in HS_PRMS_BACKWARDS don't exist in * HS_PRMS values otherwise recursion will occur. */ declare const HS_PRMS_BACKWARDS: { permalink: string; view: string; panel: string; lang: string; x: string; y: string; zoom: string; pureMap: string; visibleLayers: string; composition: string; search: string; layerSelected: string; hsWmsToConnect: string; hsWfsToConnect: string; hsWmtsToConnect: string; hsWmsLayers: string; hsWfsLayers: string; hsWmtsLayers: string; }; /** * Some params are set on map interaction or UI and we don't * want to reset their values with the original ones when generating the browser URL. * GET params not in HS_PRMS_REGENERATED will be remembered and set in the URL. */ declare const HS_PRMS_REGENERATED: string[]; export { HS_PRMS, HS_PRMS_BACKWARDS, HS_PRMS_REGENERATED, HsShareThumbnailService, HsShareUrlService };