nativescript-community / geocoding

Provides access to native geocoding APIs for NativeScript apps (android.location.Geocoder for Android, CLGeocoder for iOS).
8 stars 1 forks source link

Missing getAdminArea() method in Android Location class #7

Closed ignacio68 closed 4 years ago

ignacio68 commented 4 years ago

If the demo apps cannot help and there is no issue for your problem, tell us about it

the getAdminArea() method is missing in Android implementation.

Which platform(s) does your issue occur on?

Android

Is there any code involved?

geocoding.android.ts this.administrativeArea = androidLocation.getAdminArea()

export class Location extends LocationBase { public android: android.location.Address;

constructor(androidLocation: android.location.Address) {
    super();
    if (androidLocation) {
        this.android = androidLocation;
        this.name = androidLocation.getFeatureName();
        this.latitude = androidLocation.getLatitude();
        this.longitude = androidLocation.getLongitude();
        this.country = androidLocation.getCountryName();
        this.isoCountryCode = androidLocation.getCountryCode();
        this.locality = androidLocation.getLocality();
        this.postalCode = androidLocation.getPostalCode();
        ->> this.administrativeArea = androidLocation.getAdminArea();
        this.subLocality = androidLocation.getSubLocality();
        this.subThoroughfare = androidLocation.getSubThoroughfare();
        this.thoroughfare = androidLocation.getThoroughfare();
    }
}

}

timdoege commented 4 years ago

Fixed in 2.0.2