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
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"
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