export interface LonLat { /** Latitude */ lat: number; /** Longitude */ lon: number; } export interface LonLatZoom extends LonLat { zoom: number; bearing?: number; pitch?: number; } export interface LocationQueryConfig { /** * Style name which is generally a `tileSetId` * * @example * "aerial" * "aerialhybrid" * "bounty-islands-satellite-2020-0.5m" */ style: string; /** * TileMatrixSet identifier * * @example * "WebMercatorQuad" * "NZTM2000Quad" */ tileMatrix: string; /** * Optional configuration of how to render the imagery * * @example * "terrain-rgb" * "color-ramp" */ pipeline?: string; } export declare const LocationSlug: { /** * Number of decimal places to fix a decimal latitude/longitude * * 7 Decimal places is approx 0.011m of precision, * * Every decimal place is a factor of 10 precision * 5DP - 1.11m * 6DP - 0.11m * 7DP - 0.01m * */ LonLatFixed: number; /** Number of decimal places to fix a location zoom too */ ZoomFixed: number; /** Number of decimal places to fix a bearing */ BearingFixed: number; /** Number of decimal places to fix a pitch */ PitchFixed: number; /** Max number of degrees of pitch */ PitchMaxDegrees: number; /** * Truncate a lat lon based on the zoom level * * @param loc location to truncate */ truncateLatLon(loc: LonLatZoom): { lon: string; lat: string; zoom: string; }; /** * Truncate a bearing and pitch * * @param loc location to truncate */ truncateBearingPitch(loc: LonLatZoom): Partial; cameraStr(loc: Partial): string; /** * Encode a location into the format `@${lat},${lon},z${zoom},b${bearing},p${pitch}` * * This will truncate the lat, lon and zoom with {@link LocationSlug.truncateLatLon} * * @example * ``` * @-39.3042625,174.0794181,z22 * @-39.30426,174.07941,z13.5 * ``` */ toSlug(loc: LonLatZoom): string; /** * Parsing zooms form a string in a format of `z14` or `14z` * * @param zoom string to parse zoom from */ parseZoom(zoom: string | null): number | null; /** * Parse a location into a lat lon zoom pair * Validates that the location is withing the bounds * * - -90 <= lat <= 90 * - -190 <= lon <= 180 * - 0 <= zoom <= 32 * - 0 <= bearing <= 360 * - -PitchMaxDegrees <= pitch <= PitchMaxDegrees * * @example * * ``` * /@-39.3042625,174.0794181,z22,b225,p12.5 * #@-39.30426,174.07941,z13.5 * ``` * * @returns location if parsed and validates, null otherwise */ fromSlug(str: string): LonLatZoom | null; parseQuery(str: { get: (x: string) => string | null; }): LocationQueryConfig; };