From 534ceb2be9f8c7cb54de217ecd22ab8f4a4bf6a7 Mon Sep 17 00:00:00 2001 From: Sebastian Castro Date: Sun, 16 Aug 2020 18:06:37 +0200 Subject: [PATCH] Add locale and maxBounds to geocoder --- src/js/modules/geocoder.module.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/js/modules/geocoder.module.ts b/src/js/modules/geocoder.module.ts index c41e315..d1c1b41 100644 --- a/src/js/modules/geocoder.module.ts +++ b/src/js/modules/geocoder.module.ts @@ -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();