From c622106f2aae13e82e096dee5512b9ba68311456 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Fri, 17 Jun 2016 17:51:21 +0100 Subject: [PATCH] imagery: add missing quotes --- cookbooks/imagery/templates/default/imagery.js.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cookbooks/imagery/templates/default/imagery.js.erb b/cookbooks/imagery/templates/default/imagery.js.erb index 35168e4bb..e40950e6e 100644 --- a/cookbooks/imagery/templates/default/imagery.js.erb +++ b/cookbooks/imagery/templates/default/imagery.js.erb @@ -16,26 +16,26 @@ function createMap(divName) { <% if layer[:overlay] -%> // Create <%= layer[:name] %> overlay - var leaflet_overlays[<%= layer[:name] %>] = L.tileLayer(<%= layer[:url].to_json %>, { + leaflet_overlays["<%= layer[:name] %>"] = L.tileLayer(<%= layer[:url].to_json %>, { attribution: <%= layer[:attribution].to_json %>, maxZoom: <%= layer[:maxZoom].to_json %> }); <% if layer[:default] -%> // Add <%= layer[:name] %> to map - leaflet_overlays[<%= layer[:name] %>].addTo(map); + leaflet_overlays["<%= layer[:name] %>"].addTo(map); <% end -%> <% else %> // Create <%= layer[:name] %> layer - var leaflet_layers[<%= layer[:name] %>] = L.tileLayer(<%= layer[:url].to_json %>, { + leaflet_layers["<%= layer[:name] %>"] = L.tileLayer(<%= layer[:url].to_json %>, { attribution: <%= layer[:attribution].to_json %>, maxZoom: <%= layer[:maxZoom].to_json %> }); <% if layer[:default] -%> // Add <%= layer[:name] %> to map - leaflet_layers[<%= layer[:name] %>].addTo(map); + leaflet_layers["<%= layer[:name] %>"].addTo(map); <% end -%> <% end -%> -- 2.39.5