0
我的计算有点问题。计算mapcenter,以便移动注释(gps)仍然保持在屏幕上的可见视图中
我想要的是应用程序的用户在地图可见区域的某处放置移动的地图注记。虽然注释位置正在改变(GPS单位),但地图应该移动,但引脚始终保持在屏幕上的该点。
使用效果和
-(CLLocationDistance) calcluateDistance:(CLLocationCoordinate2D)annotationLocation{
CLLocation *annotationPosition = [[[CLLocation alloc]initWithLatitude:annotationLocation.latitude longitude:annotationLocation.longitude]autorelease];
CLLocation *centrePosition = [[CLLocation alloc]initWithLatitude:self.mapView.centerCoordinate.latitude longitude:self.mapView.centerCoordinate.longitude];
CLLocationDistance distance = [centrePosition distanceFromLocation:trackerPosition];
return distance;
}
导致扔成果转化为this stackoverflow anser
自己是不是真正的工作。我知道我的解释是不是superclear所以请问我,如果有不清楚的地方:)
五月感谢