From e00e043e68c0ce29a92884fbdf2d6593716498a7 Mon Sep 17 00:00:00 2001 From: Marcus Lundblad Date: Fri, 10 Jun 2022 10:16:43 +0200 Subject: [PATCH] photonGeocode: Set location bias scale Tweak the location_bias_scale parameter. See: https://github.com/komoot/photon/issues/600 --- src/photonGeocode.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/photonGeocode.js b/src/photonGeocode.js index 6065a8761..d1b11fe5c 100644 --- a/src/photonGeocode.js +++ b/src/photonGeocode.js @@ -31,6 +31,8 @@ import * as Utils from './utils.js'; // HTTP session timeout (in seconds) const TIMEOUT = 5; +const LOCATION_BIAS_SCALE = 0.21; + export class PhotonGeocode { constructor() { this._session = @@ -138,6 +140,8 @@ export class PhotonGeocode { if (latitude !== null && longitude != null) { query.add('lat', latitude); query.add('lon', longitude); + if (string) + query.add('location_bias_scale', LOCATION_BIAS_SCALE); } if (string)