X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/b5af72fbaa7258c5da0224d2dd818d93ff9c217c..fec6863727052589874a8727fb0cfd2f9cd2ef50:/cookbooks/imagery/resources/layer.rb?ds=sidebyside diff --git a/cookbooks/imagery/resources/layer.rb b/cookbooks/imagery/resources/layer.rb index 3ec9a0a70..8c98e5ddb 100644 --- a/cookbooks/imagery/resources/layer.rb +++ b/cookbooks/imagery/resources/layer.rb @@ -25,7 +25,7 @@ property :layer, String, :name_property => true property :site, String, :required => true property :source, String, :required => true property :root_layer, [TrueClass, FalseClass], :default => false -property :text, String +property :title, String property :copyright, String, :default => "Copyright" property :projection, String, :default => "EPSG:3857" property :palette, String @@ -34,13 +34,13 @@ property :background_colour, String property :resample, String, :default => "average" property :imagemode, String property :extension, String, :default => "png" -property :max_zoom, Fixnum, :default => 23 +property :max_zoom, Fixnum, :default => 18 property :url_aliases, [String, Array], :default => [] property :revision, Fixnum, :default => 1 property :overlay, [TrueClass, FalseClass], :default => false +property :default_layer, [TrueClass, FalseClass], :default => false action :create do - file "create layer yaml definition" do owner "root" group "root" @@ -51,8 +51,10 @@ action :create do path "/srv/imagery/layers/#{site}/#{layer}.yml" end content YAML.dump(:name => layer, - :url => "http://#{site}/layer/#{layer}/{z}/{x}/{y}.png", + :title => title || layer, + :url => "http://{s}.#{site}/layer/#{layer}/{z}/{x}/{y}.png", :attribution => copyright, + :default => default_layer, :maxZoom => max_zoom) end