Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70919

Ionic Native geocoder reverseGeocode result all undifined

$
0
0

@manjulaucsc wrote:

this is my code but all result feild undifined
let options = {
enableHighAccuracy : true
};

this.geolocation.getCurrentPosition(options).then((resp) => {
  this.nativeGeocoder.reverseGeocode(resp.coords.latitude, resp.coords.longitude)
    .then((result: NativeGeocoderReverseResult) =>{
      this.address = result.countryCode+", "+
        result.countryName+", "+
        result.administrativeArea+", "+
        result.subAdministrativeArea+", "+
        result.locality+", "+
        result.subLocality+", "+
        result.thoroughfare+", "+
        result.subThoroughfare+", "+
        result.postalCode;
    })
    .catch((error: any) => {
      this.address = "Vajira Road"
    });
}).catch((error) => {
  console.log('Error getting location', error);
});

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>