]> git.openstreetmap.org Git - rails.git/commitdiff
Don't look any further for a location if we are given a bounding box
authorTom Hughes <tom@compton.nu>
Wed, 22 Dec 2010 00:39:12 +0000 (00:39 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 22 Dec 2010 00:39:12 +0000 (00:39 +0000)
app/views/site/index.html.erb

index 31834bf7cde2469bd430496bd30f9b66a38e40ed..eac166c91e57db16c2638712b3d4bbc33bc3efc2 100644 (file)
@@ -66,18 +66,17 @@ if params['node'] or params['way'] or params['relation']
     end
 end
 
+# Decide on a lat lon to initialise the map with. Various ways of doing this
 if params['minlon'] and params['minlat'] and params['maxlon'] and params['maxlat']
     bbox = true
     minlon = h(params['minlon'])
     minlat = h(params['minlat'])
     maxlon = h(params['maxlon'])
     maxlat = h(params['maxlat'])
+    layers = h(params['layers'])
     box = true if params['box']=="yes"
     object_zoom = false
-end
-
-# Decide on a lat lon to initialise the map with. Various ways of doing this
-if params['lon'] and params['lat']
+elsif params['lon'] and params['lat']
     lon =  h(params['lon'])
     lat =  h(params['lat'])
     zoom =  h(params['zoom'] || '5')