我使用CLLocationCoordinate2D获取用户的当前位置,然后将其用于Parse的nearGeoPoint。
我知道我可以简单地使用geoPointForCurrentLocationInBackground,但我宁愿用CLLocationCoordinate2D检索。
发布于 2015-08-10 09:05:50
您可以使用geoPointWithLatitude:longitude:类的PFGeoPoint初始化器。给它你的CLLocationCoordinate2D的纬度和经度值,你就会得到你的PFGeoPoint。
例如:
PFGeoPoint *geoPoint = [PFGeoPoint geoPointWithLatitude:coordinate.latitude longitude:coordinate.longitude];https://stackoverflow.com/questions/31915377
复制相似问题