From 2b84d5bbed16648cd616fe19cd8d6c06be000322 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Fri, 26 Apr 2024 18:21:21 +0200 Subject: [PATCH] Infer `center` and `zoom` automatically if applicable --- marker.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/marker.nix b/marker.nix index c9b64cb..1b5e344 100644 --- a/marker.nix +++ b/marker.nix @@ -22,6 +22,14 @@ in { location = "Switzerland"; } { location = "New York"; } ]; + + center = lib.mkIf + (lib.length config.map.markers >= 1) + null; + + zoom = lib.mkIf + (lib.length config.map.markers >= 2) + null; }; requestParams =