Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reverseGeocode not working in real device #60

Closed
janakiram-code opened this issue Mar 26, 2021 · 2 comments
Closed

reverseGeocode not working in real device #60

janakiram-code opened this issue Mar 26, 2021 · 2 comments

Comments

@janakiram-code
Copy link

Hi,
i'm new to ionic5, I'm working on NativeGeocoder to get address using lat and lag when am using reverseGeocode its not giving the address executing catch block with {} error giving, please find my code

getCurrentCoordinates() {
this.geolocation.getCurrentPosition(this.options).then((resp) => {
this.latitude = resp.coords.latitude;
this.longitude = resp.coords.longitude;
this.getAddress(this.latitude, this.longitude);
this.getAddress1();
}).catch((error) => {
console.log('Error getting location', error);
});
}

getAddress(lat,long){
this.nativeGeocoder.reverseGeocode(lat,long, this.nativeGeocoderOptions)
.then((res: NativeGeocoderResult[]) => {
this.address = this.pretifyAddress(res[0]);
})
.catch((error: any) => {
alert('Error getting location'+ JSON.stringify(error));
});
}
Capturepackage

@pinkiwagh
Copy link

any one has resolved this issue ??? please informed?? This issue on live project.

@sebastianbaar
Copy link
Owner

Please update to v3.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants