From 6950f44a71f2570bfed7352edb0612c3c0069221 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Mon, 4 Dec 2023 01:58:23 +0300 Subject: [PATCH 1/1] Update color of mapnik map key for lakes --- app/assets/images/key/mapnik/lake.png | Bin 112 -> 0 bytes app/views/site/key.html.erb | 6 +++++- config/key.yml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) delete mode 100644 app/assets/images/key/mapnik/lake.png diff --git a/app/assets/images/key/mapnik/lake.png b/app/assets/images/key/mapnik/lake.png deleted file mode 100644 index 3f16b54d123c8affa6b461ce8ab9a9c9919dfc5f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 112 zcmeAS@N?(olHy`uVBq!ia0vp^Qb5eb!3HE(&G8EbQs$m6jv*C{$v3J#CY`#*Enas) zD1T=`q7n0iiHt}7XZED?q<6dNN^Q-!x+?U{@AvngFVMWVe?BXN$Vn%mj>2o3fJQKQ My85}Sb4q9e0PZX%3IG5A diff --git a/app/views/site/key.html.erb b/app/views/site/key.html.erb index 949121d96..da7638948 100644 --- a/app/views/site/key.html.erb +++ b/app/views/site/key.html.erb @@ -4,7 +4,11 @@ <% data.each do |entry| %> " data-zoom-max="<%= entry["max_zoom"] %>"> - <%= image_tag "key/#{name}/#{entry['image']}" %> + <% if entry["width"] && entry["height"] && entry["fill"] %> + <%= image_tag "data:image/svg+xml,#{u("")}" %> + <% else %> + <%= image_tag "key/#{name}/#{entry['image']}" %> + <% end %> <%= Array(t(".table.entry.#{entry['name']}")).to_sentence %> diff --git a/config/key.yml b/config/key.yml index c85ec0d4a..2d1cf97a0 100644 --- a/config/key.yml +++ b/config/key.yml @@ -25,7 +25,7 @@ mapnik: - { min_zoom: 10, max_zoom: 19, name: industrial, image: industrial.png } - { min_zoom: 10, max_zoom: 19, name: commercial, image: commercial.png } - { min_zoom: 10, max_zoom: 19, name: heathland, image: heathland.png } - - { min_zoom: 0, max_zoom: 19, name: lake, image: lake.png } + - { min_zoom: 0, max_zoom: 19, name: lake, width: 26, height: 10, fill: "#aad3df" } - { min_zoom: 10, max_zoom: 19, name: farm, image: farm.png } - { min_zoom: 10, max_zoom: 19, name: brownfield, image: brownfield.png } - { min_zoom: 11, max_zoom: 19, name: cemetery, image: cemetery.png } -- 2.39.5