mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-12-05 17:13:45 +01:00
fix(basemap): type provider style union
This commit is contained in:
1 parent
bb369099b7
commit
b6d3c20690
1 file changed
+3
-1
@@ -1,3 +1,5 @@
|
||||
import type { StyleSpecification } from 'maplibre-gl';
|
||||
|
||||
/**
|
||||
* ShadowBroker's zero-config basemap uses OpenFreeMap vector styles.
|
||||
* Operators who configure CARTO_API_KEY keep the existing CARTO raster
|
||||
@@ -39,7 +41,7 @@ export function cartoTileUrls(theme: BasemapTheme, cartoApiKey: string): string[
|
||||
* Use OpenFreeMap by default. CARTO is retained as an opt-in compatibility
|
||||
* path when an operator has already configured CARTO_API_KEY.
|
||||
*/
|
||||
export function buildBasemapStyle(theme: BasemapTheme, cartoApiKey?: string | null) {
|
||||
export function buildBasemapStyle(\n theme: BasemapTheme,\n cartoApiKey?: string | null,\n): string | StyleSpecification {
|
||||
const key = (cartoApiKey || '').trim();
|
||||
if (!key) return OPENFREEMAP_STYLE_URLS[theme];
|
||||
|
||||
|
||||
Reference in new issue
Block a user