【发布时间】:2017-06-09 20:44:54
【问题描述】:
有人在使用 Xamarin 解析位置字符串时遇到问题吗?
例如。我将地址“Buffalo, NY 14267”传递给 MonoTouch.CoreLocation.CLGeocoder.GeocodeAddressAsync(),然后抛出一个无用的异常。
但是,如果我使用“Addison, TX 75001”之类的地址,则不会出现错误。
代码很简单:
CLPlacemark[] placemarks = await _geoCoder.GeocodeAddressAsync(new CLLocation((double)location.Latitude, (double)location.Longitude));
编辑:我使用的是 GeocodeAddressAsync 而不是 ReverseGeocodeLocationAsync
【问题讨论】:
-
什么是“无用”异常?你看过可能的内部异常吗?您的示例代码是错误的。您粘贴了相反的。
标签: ios xamarin xamarin.ios geolocation core-location