From: Anton Khorev Date: Sun, 3 Dec 2023 22:58:23 +0000 (+0300) Subject: Update color of mapnik map key for lakes X-Git-Tag: live~855^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/6950f44a71f2570bfed7352edb0612c3c0069221?ds=sidebyside;hp=88f0d7323033786285fab328de54392cfc9b9986 Update color of mapnik map key for lakes --- diff --git a/app/assets/images/key/mapnik/lake.png b/app/assets/images/key/mapnik/lake.png deleted file mode 100644 index 3f16b54d1..000000000 Binary files a/app/assets/images/key/mapnik/lake.png and /dev/null differ 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 }