Skip to content

Commit

Permalink
graphHopperGeocode: 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 4ec4611 commit 5e79bbd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/graphHopperGeocode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5e79bbd

Please sign in to comment.