@opendatasoft/visualizations
Version:
Opendatasoft's components to easily build dashboards and visualizations.
26 lines (25 loc) • 1.52 kB
TypeScript
import type { MapOptions as MapLibreMapOptions, StyleSpecification } from 'maplibre-gl';
import type { LayerSpecification, Layer, WebGlMapData, WebGlMapOptions, PopupConfigurationByLayers, CenterZoomOptions } from './types';
export declare const getMapStyle: (style: WebGlMapOptions["style"]) => MapLibreMapOptions["style"];
export declare const getMapSources: (sources: WebGlMapData["sources"]) => StyleSpecification["sources"];
export declare const getMapLayers: (layers?: Layer[]) => LayerSpecification[];
export declare const getPopupConfigurationByLayers: (layers?: Layer[]) => PopupConfigurationByLayers;
export declare const getMapOptions: (options: WebGlMapOptions) => {
bbox: import("geojson").BBox | undefined;
zoom: number | undefined;
minZoom: number | undefined;
maxZoom: number | undefined;
center: import("maplibre-gl").LngLatLike | undefined;
interactive: boolean;
transformRequest: import("maplibre-gl").RequestTransformFunction | undefined;
cooperativeGestures: boolean | import("maplibre-gl").GestureOptions | undefined;
preserveDrawingBuffer: boolean;
images: import("./types").Images | undefined;
};
/**
* Generates a valid CenterZoomOptions object by combining optional zoom and center properties.
*
* @param options - An object with optional zoom and center properties.
* @returns A CenterZoomOptions object with valid zoom and center properties is defined.
*/
export declare const getCenterZoomOptions: (options: CenterZoomOptions) => CenterZoomOptions;