@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]
<head>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0"/>
+ <!--[if lt IE 9]><%= javascript_include_tag "html5shiv" %><![endif]-->
<%= javascript_include_tag "application" %>
- <!--[if lt IE 7]><%= javascript_include_tag "pngfix" %><![endif]--> <!-- thanks, microsoft! -->
- <%= 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" %>
<!--[if IE]>
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
- config.assets.precompile += %w( index.js edit.js browse.js changeset.js welcome.js )
+ config.assets.precompile += %w( index.js browse.js welcome.js )
- config.assets.precompile += %w( user.js diary_entry.js pngfix.js swfobject.js )
+ config.assets.precompile += %w( user.js diary_entry.js swfobject.js )
config.assets.precompile += %w( large-ltr.css small-ltr.css print-ltr.css )
config.assets.precompile += %w( large-rtl.css small-rtl.css print-rtl.css )
- config.assets.precompile += %w( browse.css leaflet-all.css leaflet.ie.css )
+ config.assets.precompile += %w( leaflet-all.css leaflet.ie.css )
config.assets.precompile += %w( embed.js embed.css )
+ config.assets.precompile += %w( html5shiv.js )
config.assets.precompile += %w( images/marker-*.png img/*-handle.png )
config.assets.precompile += %w( potlatch2.swf )
config.assets.precompile += %w( potlatch2/assets.zip )
match '/users/:status' => 'user#list', :via => [:get, :post]
# geocoder
- match '/geocoder/search' => 'geocoder#search', :via => :post
+ match '/search' => 'geocoder#search', :via => :get, :as => :search
+ match '/geocoder/search_latlon' => 'geocoder#search_latlon', :via => :get
match '/geocoder/search_us_postcode' => 'geocoder#search_us_postcode', :via => :get
match '/geocoder/search_uk_postcode' => 'geocoder#search_uk_postcode', :via => :get
match '/geocoder/search_ca_postcode' => 'geocoder#search_ca_postcode', :via => :get