From e12d305dab4939c6e02d198644ae59729fad8fd4 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Fri, 10 Feb 2023 16:57:16 +0100 Subject: [PATCH] Use default map layer if other URLs are not set --- app/component/map/Map.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/component/map/Map.js b/app/component/map/Map.js index a2c2101c16..9d3f4d1909 100644 --- a/app/component/map/Map.js +++ b/app/component/map/Map.js @@ -364,10 +364,14 @@ class Map extends React.Component { const mapUrls = []; if (isDebugTiles) { mapUrls.push(`${config.URL.OTP}inspector/tile/traversal/{z}/{x}/{y}.png`); - } else if (currentMapMode === MapMode.Satellite) { + } else if ( + currentMapMode === MapMode.Satellite && + config.URL.MAP.satellite && + config.URL.MAP.semiTransparent + ) { mapUrls.push(config.URL.MAP.satellite); mapUrls.push(config.URL.MAP.semiTransparent); - } else if (currentMapMode === MapMode.Bicycle) { + } else if (currentMapMode === MapMode.Bicycle && config.URL.MAP.bicycle) { mapUrls.push(config.URL.MAP.bicycle); } else { mapUrls.push(config.URL.MAP.default);