From a8aec1f416d8608aa024934d1c0d6f603d1178d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Cant=C3=B9?= Date: Tue, 17 Sep 2024 14:26:30 +0200 Subject: [PATCH] fallback to background if type is not defined --- metadata_catalogue/maps/libs/maplibre.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata_catalogue/maps/libs/maplibre.py b/metadata_catalogue/maps/libs/maplibre.py index 75c94b5..3f19a3e 100644 --- a/metadata_catalogue/maps/libs/maplibre.py +++ b/metadata_catalogue/maps/libs/maplibre.py @@ -183,7 +183,7 @@ def map_to_style(map: Map, request) -> MapStyle: # These arguments can be overrided extra_args = { - "type": source.type, + "type": maplibre_source.type if maplibre_source and maplibre_source.type else "background", "layout": {"visibility": "none" if layer.hidden and not layer.is_lazy else "visible"}, "attribution": source.attribution, **source.style,