X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/14936150ac8ab5cb4e8347b772b2c966f2add43f..08b44b0f8fc68070f5dd3e891ff800608f79a4df:/app/controllers/site_controller.rb diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 5fb8aa111..862148b92 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -48,6 +48,12 @@ class SiteController < ApplicationController def key expires_in 7.days, :public => true + @key = YAML.load_file(Rails.root.join("config/key.yml")) + @key.each_value do |layer_data| + 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"] + end + end render :layout => false end