Infer center and zoom automatically if applicable

This commit is contained in:
Manuel Thalmann 2024-04-26 18:21:21 +02:00
parent df9a9de068
commit 2b84d5bbed

View file

@ -22,6 +22,14 @@ in
{ location = "Switzerland"; } { location = "Switzerland"; }
{ location = "New York"; } { location = "New York"; }
]; ];
center = lib.mkIf
(lib.length config.map.markers >= 1)
null;
zoom = lib.mkIf
(lib.length config.map.markers >= 2)
null;
}; };
requestParams = requestParams =