[OSM-talk] Nominatim on the main page
tom at compton.nu
Sun Feb 18 17:45:27 UTC 2018
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:
Which encodes the bounds as the viewbox parameter which is then passed
through when calling Nominatim.
Tom Hughes (tom at compton.nu)
More information about the talk