xamarin / GoogleApisForiOSComponents

MIT License
225 stars 162 forks source link

Google's FetchPlace PlaceFields #411

Closed IngridtRodriguez closed 4 years ago

IngridtRodriguez commented 4 years ago

Hi, I'm a newbie so pardon me if this question is silly. I'm using the nuget package Xamarin.Google.ios.Places and I'm trying to get Place Detail by using FetchPlace like so: `public void DidAutocomplete(AutocompletePrediction[] predictions) { placeid = predictions.FirstOrDefault().PlaceId; var fields = new List();

        fields.Add(PlaceField.Name);
        fields.Add(PlaceField.FormattedAddress);
        fields.Add(PlaceField.PhoneNumber);
        fields.Add(PlaceField.OpeningHours);
        fields.Add(PlaceField.Photos);
        PlacesClient.SharedInstance.FetchPlace(placeid, fields, token, PlaceResultHandler);
       }`

But It's giving me an error in the fields parameters because it's expecting a Google.Places.PlaceField instead of a System.Collections.Generic.List, like described in the metadata

public virtual void FetchPlace(string placeId, PlaceField placeFields, AutocompleteSessionToken sessionToken, [BlockProxy(typeof(NIDPlaceResultHandler))] PlaceResultHandler callback);

It's there another way of doing this? if so, can someone direct me to the right direction?