import { BaseMapLibraryType } from '@kepler.gl/constants'; /** * Determines whether a Map Style is using Mapbox Tiles * @param {any} mapStyle the mapStyle to check * @returns true if the style is using Mapbox tiles */ export declare function isStyleUsingMapboxTiles(mapStyle: any): boolean; export declare function isStyleUsingOpenStreetMapTiles(mapStyle: any): boolean; /** * Minimal structural contract for the MapLibre/Mapbox map instance used by the * attribution helpers below. Only the members actually read are declared; * everything is optional because these helpers may be called before the map is * fully initialized (guarded by optional chaining + try/catch at runtime). * * `getSource` returns `any` on purpose: the concrete MapLibre/Mapbox source * union (GeoJSONSource, VectorSource, …) is not structurally assignable to a * `{attribution?}` shape, and we only ever read an optional `attribution` * string off it. Declaring the two getters still catches passing a non-map. */ export interface AttributionMapLike { getStyle?: () => { sources?: Record; } | undefined | null; getSource?: (id: string) => any; } /** * Checks resolved map sources for OpenStreetMap attribution. * CARTO basemaps don't have attribution in the raw style JSON; * it only appears after MapLibre resolves the TileJSON. * Uses map.getSource() to access the resolved source with TileJSON metadata. */ export declare function mapHasOpenStreetMapAttribution(map?: AttributionMapLike | null): boolean; /** * Collects the attribution strings declared by the resolved map sources. * Custom basemap styles (e.g. OpenFreeMap, OpenMapTiles) declare their own * attribution in the source's TileJSON, which only becomes available after * MapLibre resolves it. Unlike {@link mapHasOpenStreetMapAttribution}, this * preserves the full attribution text instead of collapsing it to a boolean, * so custom attributions are not lost. * @param map the resolved MapLibre/Mapbox map instance * @returns de-duplicated list of attribution HTML strings, order preserved */ export declare function getBaseMapAttributions(map?: AttributionMapLike | null): string[]; /** * Transform mapbox protocol so can be used with maplibre * @param mapboxKey mapbox api key * @returns transformed url */ export declare const transformRequest: (_mapboxKey: string) => ((url: string, resourceType: string) => { url: string; }); export declare const getBaseMapLibrary: (baseMapStyle?: { url?: string | null; style?: any; }) => BaseMapLibraryType;