I have a little problem with a calculation.
What I want is for the user of the app to position a moving mapannotation somewhere in the visible area of the map. And while the annotations location is changing (gps unit) the map should move but the pin always stay at that point in screen.
I am trying to use the results from this stackoverflow answer
and result from
-(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;
}
and throw results into this stackoverflow anser
Something is not really working. I know my explanation is not superclear so please ask me if anything is unclear :)
May thanks