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 18, 2022
1 parent 7904cc6 commit aeb8f5b
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 aeb8f5b

Please sign in to comment.