/** * @module maps/startupRoute * @description Which route the photoreal base starts on, from the * credentials configured; Cesium-free. */ const clean = (value) => String(value || '').trim(); /** * Decide which map provider can deliver the best startup experience. * @param {{googleApiKey?: string, cesiumToken?: string}} credentials * @returns {'google-direct'|'google-ion'|'osm'} */ export function selectMapStartupRoute({ googleApiKey = '', cesiumToken = '', } = {}) { if (clean(googleApiKey)) return 'google-direct'; if (clean(cesiumToken)) return 'google-ion'; return 'osm'; }