export interface RawMapCenter { lng?: number; lat?: number; [key: string]: any; } export interface RawBasemapLayerConfig { name?: string; type?: string; url?: string; [key: string]: any; } export interface RawBasemapConfig { id?: string | number; pid?: string | number; name?: string; type?: string; icon?: string; layers?: RawBasemapLayerConfig[]; [key: string]: any; } export interface RawLocationBarControlConfig { crs?: string; template?: string; [key: string]: any; } export interface RawMapControlConfig { scale?: boolean; locationBar?: boolean | RawLocationBarControlConfig; layers?: Record; zoom?: Record; toolBar?: Record; [key: string]: any; } export interface RawMapSection { zoom?: number; center?: RawMapCenter; minZoom?: number; maxZoom?: number; basemap?: string; centerAutoLevel?: number; defaultContextMenu?: boolean; controls?: RawMapControlConfig; basemaps?: RawBasemapConfig[]; [key: string]: any; } export interface RawMapConfig { map?: RawMapSection; [key: string]: any; } export interface NormalizedBasemapLayerConfig extends RawBasemapLayerConfig { name: string; type: string; } export interface NormalizedBasemapConfig extends RawBasemapConfig { name: string; type: string; icon?: string; layers?: NormalizedBasemapLayerConfig[]; } export interface NormalizedLocationBarControlConfig extends Omit { crs?: string; template?: string; } export interface NormalizedMapControlConfig extends Omit { locationBar?: boolean | NormalizedLocationBarControlConfig; } export interface NormalizedMapSection extends Omit { zoom: number; center: { lng: number; lat: number; }; minZoom: number; maxZoom: number; basemap: string; controls: NormalizedMapControlConfig; basemaps: NormalizedBasemapConfig[]; } export interface NormalizedMapConfig extends Omit { map: NormalizedMapSection; } export interface NormalizeMapConfigOptions { assetBaseUrl?: string; fallbackBasemap?: string; } export type MapConfigIssueLevel = 'warning'; export interface MapConfigIssue { level: MapConfigIssueLevel; path: string; message: string; } export interface NormalizeMapConfigResult { config: NormalizedMapConfig; issues: MapConfigIssue[]; }