On 18/02/18 17:34, Paul Johnson wrote:
On the OSM homepage, can we use the visible area (or maybe that plus an exploded offset to a larger surrounding bounds) as a bonding box to be passed to Nominatim for some context when searching? This animation really drives the problem home.
We already do exactly that. Sarah can clarify the details but we pass the bounding box to Nominatim and I believe it expands that by a factor of two and then prefers any results in that area over those further afield. Here's the relevant code: https://github.com/openstreetmap/openstreetmap-website/blob/master/app/controllers/geocoder_controller.rb#L115 Which encodes the bounds as the viewbox parameter which is then passed through when calling Nominatim. Tom -- Tom Hughes (t...@compton.nu) http://compton.nu/ _______________________________________________ talk mailing list talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/talk