[openstreetmap-website] Site cleanup (#150)
Tom Hughes
notifications at github.com
Fri Jan 11 12:34:35 GMT 2013
To explain a bit further how all this works, the system is designed so that each result has three values, a `prefix`, a `name` and a `suffix` and traditionally those were joined together in order to create a sentence which was displayed as the result, with the `name` as the link.
The different geocoder backends fill those in in different ways:
* `search_latlon` which is a psuedo search for lat/lon pairs
* `prefix` is not used
* `name` is the text of the lat/lon pair
* `suffix` is not used
* `search_us_postcode` which uses geocoder.us to search zip codes
* `prefix` is `town, state, `
* `name` is the zip code
* `suffix` is not used
* `search_uk_postcode` which uses npemap.org.uk to search UK postcodes
* `prefix` is not used
* `name` is the postcode
* `suffix` is not used
* `search_ca_postcode` which used geocoder.ca to search Canadian postcodes
* `prefix` is not used
* `name` is the postcode
* `suffix` is not used
* `search_osm_nominatim` which uses nomination for general searches
* `prefix` is a string from our locale files describing the object type from nominatim
* `name` is the name from nominatim
* `suffix` is not used
* `search_geonames` which uses geonames.org for general searches
* `prefix` is not used
* `name` is the name from nominatim
* `suffix` is `, country`
There are also a couple of reverse search variants used by the `Where am I?` functionality.
As you can see some of these put in punctuation in things in the expectation that they will be assembled into a sentence in a particular order and if you're going to start reordering things then you need to make appropriate changes to that.
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/150#issuecomment-12142420
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20130111/fa5cd309/attachment.html>
More information about the rails-dev
mailing list