<table class="table table-sm table-borderless mapkey-table mb-0">
<% YAML.load_file(Rails.root.join("config/key.yml")).each do |name,data| %>
<% data.each do |entry| %>
- <tr class="mapkey-table-entry" data-layer="<%= name %>" data-zoom-min="<%= entry["min_zoom"] %>" data-zoom-max="<%= entry["max_zoom"] %>">
+ <%= tag.tr :class => "mapkey-table-entry", :data => { :layer => name, :zoom_min => entry["min_zoom"], :zoom_max => entry["max_zoom"] } do %>
<td class="mapkey-table-key align-middle">
<% if entry["width"] && entry["height"] && entry["fill"] %>
<%= image_tag "data:image/svg+xml,#{u("<svg xmlns='http://www.w3.org/2000/svg' width='#{entry['width']}' height='#{entry['height']}'><rect width='100%' height='100%' fill='#{entry['fill']}' /></svg>")}" %>
<td class="mapkey-table-value">
<%= Array(t(".table.entry.#{entry['name']}")).to_sentence %>
</td>
- </tr>
+ <% end %>
<% end %>
<% end %>
</table>
- { min_zoom: 14, max_zoom: 19, name: bicycle_shop, image: bicycle_shop.png }
- { min_zoom: 14, max_zoom: 19, name: bicycle_parking, image: bicycle_parking.png }
- { min_zoom: 16, max_zoom: 19, name: toilets, image: toilets.png }
+opnvkarte:
+ - { min_zoom: 6, max_zoom: 7, name: rail, width: 52, height: 1, fill: "#868686" }
+ - { min_zoom: 8, max_zoom: 10, name: rail, width: 52, height: 2, fill: "#868686" }
+ - { min_zoom: 11, max_zoom: 14, name: rail, image: rail11.svg }
+ - { min_zoom: 15, max_zoom: 16, name: rail, image: rail15.svg }
+ - { min_zoom: 17, name: rail, image: rail17.svg }
+ - { min_zoom: 6, max_zoom: 9, name: train, width: 52, height: 2, fill: "#ffc366" }
+ - { min_zoom: 10, max_zoom: 11, name: train, width: 52, height: 3, fill: "#ffc366" }
+ - { min_zoom: 12, name: train, width: 52, height: 4, fill: "#ffc366" }
+ - { min_zoom: 10, name: light_rail, width: 52, height: 4, fill: "#66ff66" }
+ - { min_zoom: 10, name: tram_only, width: 52, height: 4, fill: "#3333fe" }
+ - { min_zoom: 10, name: subway, width: 52, height: 4, fill: "#33339f" }
+ - { min_zoom: 9, max_zoom: 13, name: ferry, width: 52, height: 2, fill: "#9f339f" }
+ - { min_zoom: 14, name: ferry, width: 52, height: 3, fill: "#9f339f" }
+ - { min_zoom: 10, name: trolleybus, width: 52, height: 4, fill: "#9f3333" }
+ - { min_zoom: 11, max_zoom: 11, name: bus, width: 52, height: 1, fill: "#fe3333" }
+ - { min_zoom: 12, max_zoom: 12, name: bus, width: 52, height: 2, fill: "#fe3333" }
+ - { min_zoom: 13, max_zoom: 13, name: bus, width: 52, height: 3, fill: "#fe3333" }
+ - { min_zoom: 14, name: bus, width: 52, height: 4, fill: "#fe3333" }
+ - { min_zoom: 13, max_zoom: 14, name: bus_stop, image: bus_stop13.svg }
+ - { min_zoom: 15, name: bus_stop, image: bus_stop15.svg }
+ - { min_zoom: 13, max_zoom: 14, name: stop, image: stop13.svg }
+ - { min_zoom: 15, name: stop, image: stop15.svg }