mobility-toolbox-js
Version:
Toolbox for JavaScript applications in the domains of mobility and logistics.
8 lines (7 loc) • 346 B
JavaScript
const getGraphByZoom = (zoom, graphsByZoom = ['osm']) => {
if (zoom > graphsByZoom.length - 1) {
return graphsByZoom === null || graphsByZoom === void 0 ? void 0 : graphsByZoom[graphsByZoom.length - 1];
}
return graphsByZoom === null || graphsByZoom === void 0 ? void 0 : graphsByZoom[zoom];
};
export default getGraphByZoom;