Skip to content

Commit

Permalink
photonUtils: Add constant for location bias scale
Browse files Browse the repository at this point in the history
Add constant value for overriding location bias scale
in the Photon-based geocoder implementations.
  • Loading branch information
mlundblad committed Jun 19, 2022
1 parent 4c2c1ab commit 9aa3f9d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/photonUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9aa3f9d

Please sign in to comment.