[gnome-maps/wip/mlundblad/location-bias-scale: 3/6] photonUtils: Add constant for location bias scale




commit 9aa3f9d47f7119bd968e8734e3ac5f017a625251
Author: Marcus Lundblad <ml dfupdate se>
Date:   Fri Jun 10 22:24:48 2022 +0200

    photonUtils: Add constant for location bias scale
    
    Add constant value for overriding location bias scale
    in the Photon-based geocoder implementations.

 src/photonUtils.js | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/photonUtils.js b/src/photonUtils.js
index 8d006a61..837b46c3 100644
--- a/src/photonUtils.js
+++ b/src/photonUtils.js
@@ -30,6 +30,12 @@ import * as Utils from './utils.js';
 
 const _ = gettext.gettext;
 
+/* Define location bias scale parameter to adjust prominance of search results
+ * with respect to location.
+ * See: https://github.com/komoot/photon/issues/600
+ */
+export const LOCATION_BIAS_SCALE = 0.5;
+
 export function parsePlace(latitude, longitude, properties) {
     let location = new GeocodeGlib.Location({ latitude:  latitude,
                                           longitude: longitude,


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