ionic-team / ionic-native-google-maps

Google maps plugin for Ionic Native
Other
221 stars 125 forks source link

Ionic 5 (IOS) use Geocoder.geocode can't get result.extra.lines #349

Closed KanKai closed 3 years ago

KanKai commented 3 years ago
this.googleAutoComplete.getPlacePredictions(
       {
         input,
        sessionToken: this.sessionToken,
      },
      (predictions: any) => {
        this.searchResults = predictions;
      }
 );
---------------------------------------------

this.destination =  this.searchResults;

const info: any = await Geocoder.geocode({
        address: this.destination.description,
 });

// android results.extra.lines[0] ----> found
// ios results.extra.lines[0] ----> not found
wf9a5m75 commented 3 years ago

Because this plugin uses two different geocoders.

In Android platform, this plugin uses 'Android Geocoder', which equals with Google Geocoder.

in iOS platform, this plugin uses 'iOS Geocoder' which is created by Apple, not Google.