Commit graph

110 commits

Author SHA1 Message Date
Tom Hughes
5925039729 Remove npemap as a source for UK postcodes 2018-02-04 15:14:41 +00:00
Tom Hughes
a83030dab7 Fix new rubocop warnings 2018-01-22 18:55:45 +00:00
Tom Hughes
be86e4824f Convert various URLs to https 2018-01-08 20:18:21 +00:00
Tom Hughes
af1397436f Use https for nominatim 2018-01-08 10:50:44 +00:00
Tom Hughes
b77406ff38 Use decoded strings when parsing XML responses from geocoders
Fixes #1690
2017-11-29 23:07:19 +00:00
Tom Hughes
8dae890a76 Fix rubocop warnings 2017-10-05 19:18:38 +01:00
Tom Hughes
6209a9be78 Drop geocoder.us from search engines
Fixes #1633
2017-09-25 22:52:03 +01:00
Tom Hughes
339d8e46ff Sanitise parameters used in URL generation 2017-06-04 20:24:53 +01:00
Tom Hughes
80d27a7fae Sanitise parameters used in URL generation 2017-06-02 20:27:07 +01:00
Tom Hughes
ff97501ed0 Remove all use of the :text option to render
It doesn't actually do what it says, as it sets the content type
to text/html not text/plain so is just confusing and as a result
has been deprecated in newer rails versions.
2017-06-02 19:12:05 +01:00
Tom Hughes
d73128271f Fix rubocop warnings 2016-09-26 12:38:54 +01:00
Sarah Hoffmann
5efbc8a8b7 look for extra place tags in Nominatim search results
Administrative boundaries at municipality level are generally
better described by the place node (as town, village etc.).
Nominatim exports the place type in extratags if it was able
to merge place nodes with admin boundaries. Use this preferably
to create the descriptive term.
2016-09-26 13:00:10 +02:00
Tom Hughes
5d3ecffa28 Fix new rubocop warnings 2016-02-05 13:35:26 +00:00
Tom Hughes
8fe1899596 Fix rubocop warnings 2016-01-19 09:51:24 +00:00
Tom Hughes
c9d35839be Fix new rubocopy warnings 2015-08-18 20:57:14 +01:00
Tom Hughes
93a617fec9 Error if geocoder#search is called with no arguments 2015-07-26 22:58:41 +01:00
Tom Hughes
b4caac4d49 Improve handling of HTTP errors in search
Fixes #969
2015-05-14 09:21:19 +01:00
Tom Hughes
e2609b9758 Remove unused code 2015-03-02 00:07:13 +00:00
Tom Hughes
1891efef06 Testing, testing, testing... 2015-03-01 23:05:32 +00:00
Tom Hughes
33790824d6 Use Faraday in place of Net::HTTP so we can mock responses 2015-03-01 19:22:46 +00:00
Tom Hughes
dbe165bbb3 Fix some rubocop rails style issues 2015-02-26 00:12:54 +00:00
Tom Hughes
dc2a2c8ebd Standardise on double quoted strings 2015-02-20 19:47:26 +00:00
Tom Hughes
5cbd4038ed Fix rubocop style issues 2015-02-20 08:56:16 +00:00
Tom Hughes
baf10cd392 Fix rubocop lint issues 2015-02-20 08:56:16 +00:00
Tom Hughes
ef7f3d800c Fix most auto-correctable rubocop issues 2015-02-20 08:56:16 +00:00
Tom Hughes
098f8e98f2 Avoid mixed content warnings when routing queries Nominatim 2015-02-16 21:46:54 +00:00
Tom Hughes
6cb01999c6 Remove debug statement 2014-07-04 19:58:03 +01:00
Tom Hughes
d27cc80b43 Use the exclusion list returned by nominatim
When constructing a "more results" link for nominatim, use the
exclusion list returned by the previous query instead of trying
to make on up ourselves.

Fixes #701
2014-06-15 15:20:50 +01:00
Tom Hughes
339ac9d239 Pass preferred language to geonames API calls 2014-01-27 21:14:17 +00:00
Tom Hughes
ccebb796ab Use api.geonames.org for reverse searches 2014-01-27 21:14:17 +00:00
Tom Hughes
581032b701 Enable oauth for geocoder#search 2013-11-24 17:05:02 +00:00
John Firebaugh
2b4f8e92c9 Merge branch 'master' into redesign
Conflicts:
	app/controllers/browse_controller.rb
	app/views/layouts/_head.html.erb
	config/environments/production.rb
	config/routes.rb
2013-11-15 16:47:49 -08:00
Tom Hughes
82e4970766 Handle an empty type value in a nominatim result 2013-10-21 18:56:56 +01:00
John Firebaugh
5835350879 Restore raw latlon search result 2013-10-15 21:01:14 +01:00
John Firebaugh
35458c0096 Convert search to pushState 2013-10-13 14:46:08 -07:00
John Firebaugh
aaeca5b534 Use reverse geocoders for any lat/lon queries
This simplifies the implementation, allows code sharing with
"Where am I?", and produces friendlier results for lat/lon
searches (actual reverse geocode results rather than a raw
lat/lon display).
2013-10-13 19:30:38 +01:00
Tom Hughes
0e9e6e6f8f Upgrade to http_accept_language 2.x 2013-09-24 20:22:44 +01:00
Sarah Hoffmann
378869b77d Show more specific boundary type in search results 2013-06-24 22:26:28 +01:00
Tom Hughes
427f896cdf Fix a bug decoding certain lat/lon formats 2013-05-08 19:21:19 +01:00
Tom Hughes
2b99d77962 Don't cast object type and ID to string in case they are nil 2013-05-07 17:39:11 +01:00
Tom Hughes
b1308a87be Show OSM objects for Nominatim search results as map overlays 2013-04-26 00:39:26 +01:00
Eric Theise
dce2bb9a54 Extend geocoder to support additional lat/lon formats 2013-03-03 19:39:53 +00:00
Tom Hughes
1a0728ec7b Remove unused namefinder support from the geocoder backend 2012-09-18 11:54:11 +01:00
Tom Hughes
1a2f6c29c6 Update to use api.geonames.org instead of ws.geonames.org 2012-04-18 18:44:37 +01:00
Tom Hughes
13289d4041 Switch from Prototype to jQuery 2011-11-26 00:22:31 +00:00
Tom Hughes
f364dd8f00 Allow the Nominatim instance used to be configured 2010-11-02 10:40:43 +00:00
Tom Hughes
f07819d81a Rework application configuration
Use a preinitializer to load the settings from application.yml so
that they are available as early as possible. All settings can also
be overridden using environment variables.

The ad-hoc settins in environment.rb are then moved to this new
system so we have one consistent location for settings.
2010-08-04 22:06:05 +01:00
Tom Hughes
798cdc1d19 Tweak resource names to make them fit the normal naming scheme 2010-05-18 00:09:29 +01:00
Ævar Arnfjörð Bjarmason
0fd4a61759 Allow for formatting of the nominatim prefix in the i18n system
It's a pain to translate nominatim as-is because the context forces me
to translate things in the accusative case. Now I can change
"{{name}}" into "{{name}}:" and translate things in the nominative
case.

Not putting the message in search_osm_nominatim so I don't infringe
upon its namespace.
2010-05-18 00:06:43 +01:00
Tom Hughes
e076d824bf Make sure we report "no results" when Nominatim's reverse geocoder fails
to find any results.
2010-02-27 12:52:30 +00:00