[gnome-maps/wip/mlundblad/location-bias-scale: 3/4] graphHopperGeocode: Set location bias scale




commit aeb8f5b49b8768de0d4c05aee6fb4325cb5ebdd0
Author: Marcus Lundblad <ml dfupdate se>
Date:   Fri Jun 10 10:22:07 2022 +0200

    graphHopperGeocode: Set location bias scale
    
    Tweak the location_bias_scale parameter.
    See: https://github.com/komoot/photon/issues/600

 src/graphHopperGeocode.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/graphHopperGeocode.js b/src/graphHopperGeocode.js
index 1740f6a3..790beb2a 100644
--- a/src/graphHopperGeocode.js
+++ b/src/graphHopperGeocode.js
@@ -139,8 +139,11 @@ export class GraphHopperGeocode {
                                      locale:  this._language,
                                      key:     this._apiKey
                                    });
-        if (latitude !== null && longitude != null)
+        if (latitude !== null && longitude != null) {
             query.add('point', latitude + ',' + longitude);
+            if (string)
+                query.add('location_bias_scale', PhotonUtils.LOCATION_BIAS_SCALE);
+        }
 
         if (string)
             query.add('q', string);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]