Merge remote-tracking branch 'upstream/pull/4425'

This commit is contained in:
Tom Hughes 2023-12-21 18:46:22 +00:00
commit 10d65cc857
4 changed files with 45 additions and 51 deletions

View file

@ -50,6 +50,9 @@ class SiteController < ApplicationController
expires_in 7.days, :public => true expires_in 7.days, :public => true
@key = YAML.load_file(Rails.root.join("config/key.yml")) @key = YAML.load_file(Rails.root.join("config/key.yml"))
@key.each_value do |layer_data| @key.each_value do |layer_data|
layer_data.each do |entry|
entry["name"] = Array(entry["name"])
end
layer_data.each_cons(2) do |entry, next_entry| layer_data.each_cons(2) do |entry, next_entry|
entry["max_zoom"] = next_entry["min_zoom"] - 1 if entry["name"] == next_entry["name"] && !entry["max_zoom"] && next_entry["min_zoom"] entry["max_zoom"] = next_entry["min_zoom"] - 1 if entry["name"] == next_entry["name"] && !entry["max_zoom"] && next_entry["min_zoom"]
end end

View file

@ -11,7 +11,7 @@
<% end %> <% end %>
</td> </td>
<td> <td>
<%= Array(t(".table.entry.#{entry['name']}")).to_sentence %> <%= entry["name"].map { |feature_name| t ".table.entry.#{feature_name}" }.join(" · ") %>
</td> </td>
<% end %> <% end %>
<% end %> <% end %>

View file

@ -19,27 +19,27 @@ mapnik:
- { min_zoom: 14, name: tram_only, width: 52, height: 1, fill: "#6e6e6e" } - { min_zoom: 14, name: tram_only, width: 52, height: 1, fill: "#6e6e6e" }
- { min_zoom: 15, name: tram_only, image: tram15.svg } - { min_zoom: 15, name: tram_only, image: tram15.svg }
- { min_zoom: 17, name: tram_only, width: 52, height: 2, fill: "#6e6e6e" } - { min_zoom: 17, name: tram_only, width: 52, height: 2, fill: "#6e6e6e" }
- { min_zoom: 12, name: cable, image: cable.png } - { min_zoom: 12, name: [cable_car, chair_lift], image: cable.png }
- { min_zoom: 11, name: runway, image: runway11.svg } - { min_zoom: 11, name: [runway_only, taxiway], image: runway11.svg }
- { min_zoom: 12, name: runway, image: runway12.svg } - { min_zoom: 12, name: [runway_only, taxiway], image: runway12.svg }
- { min_zoom: 13, name: runway, image: runway13.svg } - { min_zoom: 13, name: [runway_only, taxiway], image: runway13.svg }
- { min_zoom: 14, name: runway, image: runway14.svg } - { min_zoom: 14, name: [runway_only, taxiway], image: runway14.svg }
- { min_zoom: 11, name: apron_only, width: 26, height: 10, fill: "#dadae0" } # landcover.mss - { min_zoom: 11, name: apron_only, width: 26, height: 10, fill: "#dadae0" } # landcover.mss
# administrative boundaries: admin.mss # administrative boundaries: admin.mss
- { name: admin, width: 52, height: 2, fill: "#8d618b88" } - { name: admin, width: 52, height: 2, fill: "#8d618b88" }
# landcover z5: landcover.mss, water.mss # landcover z5: landcover.mss, water.mss
- { name: lake, width: 26, height: 10, fill: "#aad3df" } - { name: [lake_only, reservoir], width: 26, height: 10, fill: "#aad3df" }
- { name: intermittent_water, image: intermittent_water.svg } - { name: intermittent_water, image: intermittent_water.svg }
- { min_zoom: 5, name: glacier, image: glacier5.svg } - { min_zoom: 5, name: glacier, image: glacier5.svg }
- { min_zoom: 10, name: glacier, image: glacier10.svg } - { min_zoom: 10, name: glacier, image: glacier10.svg }
- { min_zoom: 10, name: reef, image: reef.png } - { min_zoom: 10, name: reef, image: reef.png }
- { min_zoom: 10, name: wetland, image: wetland.png } - { min_zoom: 10, name: wetland, image: wetland.png }
- { min_zoom: 5, name: forest, width: 26, height: 10, fill: "#bddab1" } - { min_zoom: 5, name: [forest_only, wood], width: 26, height: 10, fill: "#bddab1" }
- { min_zoom: 12, name: forest, width: 26, height: 10, fill: "#add19e" } - { min_zoom: 12, name: [forest_only, wood], width: 26, height: 10, fill: "#add19e" }
- { min_zoom: 5, name: orchard, width: 26, height: 10, fill: "#bee5b5" } - { min_zoom: 5, name: [orchard_only, vineyard], width: 26, height: 10, fill: "#bee5b5" }
- { min_zoom: 12, name: orchard, width: 26, height: 10, fill: "#aedfa3" } - { min_zoom: 12, name: [orchard_only, vineyard], width: 26, height: 10, fill: "#aedfa3" }
- { min_zoom: 5, name: grass, width: 26, height: 10, fill: "#d7efc0" } - { min_zoom: 5, name: [grass_only, meadow], width: 26, height: 10, fill: "#d7efc0" }
- { min_zoom: 12, name: grass, width: 26, height: 10, fill: "#cdebb0" } - { min_zoom: 12, name: [grass_only, meadow], width: 26, height: 10, fill: "#cdebb0" }
- { min_zoom: 5, name: farmland, width: 26, height: 10, fill: "#f1f3dd" } - { min_zoom: 5, name: farmland, width: 26, height: 10, fill: "#f1f3dd" }
- { min_zoom: 12, name: farmland, width: 26, height: 10, fill: "#eef0d5" } - { min_zoom: 12, name: farmland, width: 26, height: 10, fill: "#eef0d5" }
- { min_zoom: 5, name: heathland, width: 26, height: 10, fill: "#dee1b2" } - { min_zoom: 5, name: heathland, width: 26, height: 10, fill: "#dee1b2" }
@ -71,7 +71,7 @@ mapnik:
- { min_zoom: 11, name: centre, width: 26, height: 10, fill: "#dffce2" } - { min_zoom: 11, name: centre, width: 26, height: 10, fill: "#dffce2" }
- { min_zoom: 10, name: reserve, image: reserve.svg } # admin.mss - { min_zoom: 10, name: reserve, image: reserve.svg } # admin.mss
- { min_zoom: 8, name: military, image: military.svg } - { min_zoom: 8, name: military, image: military.svg }
- { min_zoom: 13, name: school, image: school.svg } - { min_zoom: 13, name: [school_only, university, hospital], image: school.svg }
# buildings: buildings.mss # buildings: buildings.mss
- { min_zoom: 14, name: building, width: 10, height: 10, fill: "#ab9793" } - { min_zoom: 14, name: building, width: 10, height: 10, fill: "#ab9793" }
- { min_zoom: 15, name: building, image: building15.svg } - { min_zoom: 15, name: building, image: building15.svg }
@ -81,7 +81,7 @@ mapnik:
- { min_zoom: 13, name: station, width: 6, height: 6, fill: "#7981b0" } - { min_zoom: 13, name: station, width: 6, height: 6, fill: "#7981b0" }
- { min_zoom: 15, name: station, width: 9, height: 9, fill: "#7981b0" } - { min_zoom: 15, name: station, width: 9, height: 9, fill: "#7981b0" }
# other # other
- { min_zoom: 11, name: summit, image: summit.svg } # amenity-points.mss - { min_zoom: 11, name: [summit_only, peak], image: summit.svg } # amenity-points.mss
- { min_zoom: 13, name: tunnel, image: tunnel.svg } # roads.mss - { min_zoom: 13, name: tunnel, image: tunnel.svg } # roads.mss
- { min_zoom: 13, name: bridge, image: bridge.svg } # roads.mss - { min_zoom: 13, name: bridge, image: bridge.svg } # roads.mss
- { min_zoom: 15, name: private, image: private.png } - { min_zoom: 15, name: private, image: private.png }
@ -108,9 +108,11 @@ cyclemap:
- { min_zoom: 13, name: footway, image: footway.svg } - { min_zoom: 13, name: footway, image: footway.svg }
- { min_zoom: 7, name: rail, image: rail.png } - { min_zoom: 7, name: rail, image: rail.png }
- { min_zoom: 14, name: rail, image: rail14.png } - { min_zoom: 14, name: rail, image: rail14.png }
- { min_zoom: 9, name: forest, width: 26, height: 10, fill: "#b3d6a4" } - { min_zoom: 1, name: [lake_only, reservoir], width: 26, height: 10, fill: "#addeff" }
- { min_zoom: 10, name: common, width: 26, height: 10, fill: "#c0de9c" } - { min_zoom: 9, name: [forest_only, wood], width: 26, height: 10, fill: "#b3d6a4" }
- { min_zoom: 1, name: lake, width: 26, height: 10, fill: "#addeff" } - { min_zoom: 10, name: meadow, width: 26, height: 10, fill: "#c0de9c" }
- { min_zoom: 10, name: park, width: 26, height: 10, fill: "#cbe4c4" }
- { min_zoom: 10, name: common_only, width: 26, height: 10, fill: "#d4f0d1" }
- { min_zoom: 14, name: bicycle_shop, image: bicycle_shop.png } - { min_zoom: 14, name: bicycle_shop, image: bicycle_shop.png }
- { min_zoom: 14, name: bicycle_parking, image: bicycle_parking.png } - { min_zoom: 14, name: bicycle_parking, image: bicycle_parking.png }
- { min_zoom: 16, name: toilets, image: toilets.png } - { min_zoom: 16, name: toilets, image: toilets.png }
@ -162,9 +164,9 @@ opnvkarte:
- { min_zoom: 15, name: main_road, image: main_road15.svg } - { min_zoom: 15, name: main_road, image: main_road15.svg }
- { min_zoom: 17, name: main_road, image: main_road17.svg } - { min_zoom: 17, name: main_road, image: main_road17.svg }
# landcover # landcover
- { min_zoom: 0, name: lake, width: 26, height: 10, fill: "#a1cbea" } - { min_zoom: 0, name: [lake_only, reservoir], width: 26, height: 10, fill: "#a1cbea" }
- { min_zoom: 8, name: lake, width: 26, height: 10, fill: "#bfd3ef" } - { min_zoom: 8, name: [lake_only, reservoir], width: 26, height: 10, fill: "#bfd3ef" }
- { min_zoom: 4, name: forest, width: 26, height: 10, fill: "#b9c5a3" } - { min_zoom: 4, name: [forest_only, wood], width: 26, height: 10, fill: "#b9c5a3" }
- { min_zoom: 4, name: built_up, width: 26, height: 10, fill: "#d8d8d8" } - { min_zoom: 4, name: built_up, width: 26, height: 10, fill: "#d8d8d8" }
- { min_zoom: 9, name: farmland, width: 26, height: 10, fill: "#eae8d6" } - { min_zoom: 9, name: farmland, width: 26, height: 10, fill: "#eae8d6" }
- { min_zoom: 12, name: park, width: 26, height: 10, fill: "#c2d89a" } # also allotments - { min_zoom: 12, name: [park, allotments], width: 26, height: 10, fill: "#c2d89a" }

View file

@ -2314,32 +2314,24 @@ en:
tram_only: "Tram" tram_only: "Tram"
trolleybus: "Trolleybus" trolleybus: "Trolleybus"
bus: "Bus" bus: "Bus"
cable: cable_car: "Cable car"
- Cable car chair_lift: "Chair lift"
- chair lift runway_only: "Airport Runway"
runway: taxiway: "Taxiway"
- Airport Runway
- taxiway
apron_only: "Airport apron" apron_only: "Airport apron"
admin: "Administrative boundary" admin: "Administrative boundary"
orchard: orchard_only: "Orchard"
- Orchard vineyard: "Vineyard"
- vineyard forest_only: "Forest"
forest: wood: "Wood"
- Forest
- wood
farmland: "Farmland" farmland: "Farmland"
grass: grass_only: "Grass"
- Grass meadow: "Meadow"
- meadow
bare_rock: "Bare rock" bare_rock: "Bare rock"
sand: "Sand" sand: "Sand"
golf: "Golf course" golf: "Golf course"
park: "Park" park: "Park"
common: common_only: "Common"
- Common
- meadow
- garden
built_up: "Built-up area" built_up: "Built-up area"
resident: "Residential area" resident: "Residential area"
retail: "Retail area" retail: "Retail area"
@ -2347,9 +2339,8 @@ en:
commercial: "Commercial area" commercial: "Commercial area"
heathland: "Heathland" heathland: "Heathland"
scrubland: "Scrubland" scrubland: "Scrubland"
lake: lake_only: "Lake"
- Lake reservoir: "Reservoir"
- reservoir
intermittent_water: "Intermittent waterbody" intermittent_water: "Intermittent waterbody"
glacier: "Glacier" glacier: "Glacier"
reef: "Reef" reef: "Reef"
@ -2362,15 +2353,13 @@ en:
centre: "Sports centre" centre: "Sports centre"
reserve: "Nature reserve" reserve: "Nature reserve"
military: "Military area" military: "Military area"
school: school_only: "School"
- School university: "University"
- university hospital: "Hospital"
- hospital
building: "Significant building" building: "Significant building"
station: "Railway station" station: "Railway station"
summit: summit_only: "Summit"
- Summit peak: "Peak"
- peak
tunnel: "Dashed casing = tunnel" tunnel: "Dashed casing = tunnel"
bridge: "Black casing = bridge" bridge: "Black casing = bridge"
private: "Private access" private: "Private access"