From: John Firebaugh Date: Sat, 16 Nov 2013 00:47:49 +0000 (-0800) Subject: Merge branch 'master' into redesign X-Git-Tag: live~4625^2~53 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/2b4f8e92c969a5508b73ae7af45811a118fda6b1 Merge branch 'master' into redesign Conflicts: app/controllers/browse_controller.rb app/views/layouts/_head.html.erb config/environments/production.rb config/routes.rb --- 2b4f8e92c969a5508b73ae7af45811a118fda6b1 diff --cc app/controllers/geocoder_controller.rb index 592ff020a,6db70a6f3..87eb329ab --- a/app/controllers/geocoder_controller.rb +++ b/app/controllers/geocoder_controller.rb @@@ -28,10 -29,26 +29,28 @@@ class GeocoderController < ApplicationC @sources.push "osm_nominatim" @sources.push "geonames" if defined?(GEONAMES_USERNAME) end + + render :layout => map_layout end + def search_latlon + lat = params[:lat].to_f + lon = params[:lon].to_f + if lat < -90 or lat > 90 + @error = "Latitude #{lat} out of range" + render :action => "error" + elsif lon < -180 or lon > 180 + @error = "Longitude #{lon} out of range" + render :action => "error" + else + @results = [{:lat => lat, :lon => lon, + :zoom => params[:zoom], + :name => "#{lat}, #{lon}"}] + + render :action => "results" + end + end + def search_us_postcode # get query parameters query = params[:query] diff --cc app/views/layouts/_head.html.erb index 46fe40f04,93b48c315..9951737bc --- a/app/views/layouts/_head.html.erb +++ b/app/views/layouts/_head.html.erb @@@ -1,10 -1,9 +1,10 @@@ + + <%= javascript_include_tag "application" %> - - <%= stylesheet_link_tag "small-#{dir}", :media => "only screen and (max-width:641px)" %> - <%= stylesheet_link_tag "large-#{dir}", :media => "screen and (min-width: 642px)" %> + <%= stylesheet_link_tag "small-#{dir}", :media => "only screen and (max-width:721px)" %> + <%= stylesheet_link_tag "large-#{dir}", :media => "screen and (min-width: 722px)" %> <%= stylesheet_link_tag "print-#{dir}", :media => "print" %> <%= stylesheet_link_tag "leaflet-all", :media => "screen, print" %>