imagery: fix layer/overview inversion
authorGrant Slater <git@firefishy.com>
Fri, 3 Jun 2016 00:14:59 +0000 (01:14 +0100)
committerGrant Slater <git@firefishy.com>
Fri, 3 Jun 2016 00:14:59 +0000 (01:14 +0100)
cookbooks/imagery/templates/default/imagery.js.erb

index fa70ed457f785ee95188adf59faa672c402f3854..dc41827062fb89b3b25d0088b2d9aaad2745ca9b 100644 (file)
@@ -20,9 +20,9 @@ function createMap(divName) {
 
   // Add <%= layer[:name] %> to layer switcher
   <% if layer[:overlay] -%>
-  layers.addBaseLayer(<%= layer[:name] %>, <%= layer[:title].to_json %>);
-  <% else %>
   layers.addOverlay(<%= layer[:name] %>, <%= layer[:title].to_json %>);
+  <% else %>
+  layers.addBaseLayer(<%= layer[:name] %>, <%= layer[:title].to_json %>);
   <% end -%>
 
   <% if layer[:default] -%>