Skip to content

Commit

Permalink
Add locale and maxBounds to geocoder
Browse files Browse the repository at this point in the history
  • Loading branch information
seballot committed Aug 16, 2020
1 parent 7b96317 commit 534ceb2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/js/modules/geocoder.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,14 @@ export class GeocoderModule {
const fake = false;

if (!fake) {
this.geocoder.geocode(address, (results: Geocoded[]) => {
this.geocoder.geocode({
text: address,
locale: App.config.language,
south: App.config.map.maxBounds.getSouth(),
west: App.config.map.maxBounds.getWest(),
north: App.config.map.maxBounds.getNorth(),
east: App.config.map.maxBounds.getEast()
}, (results: Geocoded[]) => {
if (results.length <= 0) {
if (callbackFail) {
callbackFail();
Expand Down

0 comments on commit 534ceb2

Please sign in to comment.