mobility-toolbox-js
Version:
Toolbox for JavaScript applications in the domains of mobility and logistics.
14 lines (13 loc) • 668 B
TypeScript
import type { StyleMetadataGraphs } from '../../types';
export declare const DEFAULT_GRAPH = "osm";
export declare const DEFAULT_GRAPH_MAPPING: StyleMetadataGraphs;
/**
* This function return which graph to use based on the current zoom level.
*
* The list of graphs available for a maplibre style is available in the style metadata.
*
* @param {number} zoom - The current zoom level of the map.
* @param {StyleMetadataGraphs} styleMetadata - The style metadata containing the graph mapping.
* @returns {string} - The graph to use for the given zoom level.
*/
export default function getGraphByZoom(zoom?: number, styleMetadata?: StyleMetadataGraphs): string;