import { ConfigImagery } from '@basemaps/config'; import { Size } from '@basemaps/geo'; export declare const PreviewSize: { width: number; height: number; }; /** * Find the approximate center and zoom level for of a imagery set * * @param imageryList * @param previewSize * @returns approximate center and zoom level for the imagery set */ export declare function getImageryCenterZoom(imagery: ConfigImagery | ConfigImagery[], previewSize?: Size): { lat: number; lon: number; zoom: number; }; /** * Create a slug for a location that can be used in basemaps links and is human readable * * in the format `@${lat},${lon},z${llz.zoom}`; * * @example "@-36.5518610,174.8770907,z8" * @param llz * @returns */ export declare function toSlug(llz: { lat: number; lon: number; zoom: number; }): string; export interface PreviewConfig { /** imagery to create a preview URL for */ imagery: ConfigImagery; /** output preview size */ size?: Size; /** optional configuration location */ config?: string; /** optional pipeline to use */ pipeline?: string; } export interface PreviewResult { /** * relative URL to the preview location * * @example * * "/v1/preview/..." */ url: string; /** * standardized name of the layer */ name: string; /** * location slug useful for basemaps links * * @example "@-36.5518610,174.8770907,z8" */ slug: string; /** * Components of the slug broken out into their parts */ location: { lat: number; lon: number; zoom: number; }; /** * Query string parameters for t he preview including config and pipeline if needed * * @example * "?config=s3://...&pipeline=terrain-rgb" */ query: string; } export declare function getPreviewUrl(ctx: PreviewConfig): PreviewResult; /** * Create a query string for a preview URL using pipeline and configuration if they are needed * * @param ctx * @returns a query string prefixed with `?` if it is needed, empty string otherwise */ export declare function getPreviewQuery(ctx: { config?: string | null; pipeline?: string | null; }): string;