Allow configuring the size of pins
This commit is contained in:
parent
4caca606a3
commit
32904e238f
1 changed files with 24 additions and 2 deletions
26
marker.nix
26
marker.nix
|
@ -38,6 +38,17 @@ let
|
|||
type = colorType;
|
||||
default = "red";
|
||||
};
|
||||
|
||||
size = lib.mkOption {
|
||||
type = lib.types.enum [
|
||||
"tiny"
|
||||
"small"
|
||||
"medium"
|
||||
"large"
|
||||
];
|
||||
|
||||
default = "medium";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -72,6 +83,7 @@ in
|
|||
users = {
|
||||
manuel.departure = {
|
||||
location = "Switzerland";
|
||||
style.size = "small";
|
||||
};
|
||||
|
||||
ganondorf.departure = {
|
||||
|
@ -105,9 +117,19 @@ in
|
|||
paramForMarker =
|
||||
marker:
|
||||
let
|
||||
size = {
|
||||
tiny = "tiny";
|
||||
small = "small";
|
||||
medium = "mid";
|
||||
large = null;
|
||||
}.${marker.style.size};
|
||||
attributes =
|
||||
lib.optional (marker.style.label != null)
|
||||
"label:${marker.style.label}"
|
||||
lib.optional
|
||||
(marker.style.label != null)
|
||||
"label:${marker.style.label}"
|
||||
++ lib.optional
|
||||
(size != null)
|
||||
"size:${size}"
|
||||
++ [
|
||||
"color:${marker.style.color}"
|
||||
"$(${config.scripts.geocode}/bin/geocode ${
|
||||
|
|
Loading…
Reference in a new issue