UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

29 lines 1.55 kB
import { type Box } from '@expofp/geometry'; import { type LngLatBoundsLike, type Map as MaplibreMap } from 'maplibre-gl'; import { type GeoConfig as MaplibreGeoConfig } from '../MaplibreWrapper'; import { type TransformGeoConfig } from './solver'; export interface GeoConfig extends MaplibreGeoConfig { gpsConfig: TransformGeoConfig; } export interface CameraPaddingOptions { top: number; bottom: number; left: number; right: number; } export interface FitMapOptions { duration?: number; padding?: number; } export declare const MAP_BOUNDS_PADDING_FACTOR = 3; export declare const MAP_BOUNDS_MIN_PADDING_DEGREES = 0.02; export declare const INITIAL_FIT_ZOOM_ADJUSTMENT = 0.15; export declare function deriveVenueMapBounds(config: TransformGeoConfig): LngLatBoundsLike | undefined; export declare function getLocalRectGeoBounds(rect: Box, config: TransformGeoConfig): LngLatBoundsLike; export declare function getVisibleRectFitPadding(extraPadding?: number): CameraPaddingOptions; /** Whether a lng/lat projects inside the visible viewport, inset by `padding`. */ export declare function isLngLatInVisibleViewport(map: MaplibreMap, lngLat: [number, number], padding: CameraPaddingOptions): boolean; /** Geographic configuration from fpGeo data; null when unavailable. */ export declare function deriveGeoConfig(): GeoConfig | null; export declare function fitMapToLocalRect(map: MaplibreMap | null, rect: Box | null, geoConfig: GeoConfig | null, options?: FitMapOptions): void; //# sourceMappingURL=geo-config.d.ts.map