[gnome-maps/wip/mlundblad/location-bias-scale: 1/3] photonGeocode: Set location bias scale
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/location-bias-scale: 1/3] photonGeocode: Set location bias scale
- Date: Fri, 10 Jun 2022 08:35:38 +0000 (UTC)
commit e00e043e68c0ce29a92884fbdf2d6593716498a7
Author: Marcus Lundblad <ml dfupdate se>
Date: Fri Jun 10 10:16:43 2022 +0200
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 6065a876..d1b11fe5 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]