Xamarin.iOS可以将经纬度来解决与错误com.google.HTTPStatus错误400
问题描述:
我需要我的纬度和经度转换为地址转换成从这样提取的数据也Xamarin.iOS可以将经纬度来解决与错误com.google.HTTPStatus错误400
这里是我的方法,但这种失败,错误{The operation couldn’t be completed. (com.google.HTTPStatus error 400.)}
void ConvertLatLong(double latitude, double longitude)
{
try
{
Geocoder geocoder;
CLLocationCoordinate2D location = new CLLocationCoordinate2D(latitude, longitude);
geocoder = new Geocoder();
geocoder.ReverseGeocodeCord(location ,(response, error) => {
if (error != null) return;
var addresses = response.Results;
if (addresses != null && addresses.Length > 1)
{
Address selectedAddress = addresses[1];
if (selectedAddress.AdministrativeArea != null)
{
var citySelected = citiesLookupResult.Find(c => (selectedAddress.AdministrativeArea.Contains(c.NameEn)));
chooseCity.Text = citySelected.NameEn;
}
}
});
}
catch (Exception e)
{
}
}
我试图解决这个问题
首先我要确保我的包名是谷歌控制台和我的应用程序之间的匹配
二确保我凭据下设置我的电子邮件,应用程序的名称 - >在OAuth同意画面
任何一个都可能帮助我与我的问题
确保“启用GoogleMap SDK for iOS” – KKRocks
您是否在appdelegate中为GMSServices注册了api密钥? – KKRocks