From: Tom Hughes Date: Tue, 3 Jun 2008 15:12:46 +0000 (+0000) Subject: Cope with not having a layer configuration at all. X-Git-Tag: live~7735 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/2829bf79d0120ba534a1b4f5ad75ae1622a76d06?hp=c25a20ff133d0ff9c865ac2cbc0076544cb4f16b Cope with not having a layer configuration at all. --- diff --git a/app/views/site/index.rhtml b/app/views/site/index.rhtml index 3e0400ce4..e30dad1d0 100644 --- a/app/views/site/index.rhtml +++ b/app/views/site/index.rhtml @@ -76,8 +76,8 @@ by the OpenStreetMap project and its contributors. <% lon = '-0.1' %> <% lat = '51.5' %> <% zoom = h(params['zoom'] || '5') %> -<% layers = h(params['layers']) %> <% end %> +<% layers = h(params['layers']) %> <% end %> <%= javascript_include_tag '/openlayers/OpenLayers.js' %> @@ -109,7 +109,7 @@ by the OpenStreetMap project and its contributors. setMapCenter(centre, zoom); <% end %> - <% if !layers.empty? %> + <% if !layers.nil? and !layers.empty? %> setMapLayers("<%= layers %>"); <% end %>