Skip to content

Commit

Permalink
photonGeocode: Set location bias scale
Browse files Browse the repository at this point in the history
Tweak the location_bias_scale parameter.
See: komoot/photon#600
  • Loading branch information
mlundblad committed Jun 10, 2022
1 parent a46fff8 commit 4e49927
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/photonGeocode.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import * as Utils from './utils.js';
// HTTP session timeout (in seconds)
const TIMEOUT = 5;

const LOCATION_BIAS_SCALE = 0.2;

export class PhotonGeocode {
constructor() {
this._session =
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 4e49927

Please sign in to comment.