Adding an offset to the latitude and longitude in iOS
I want to add an offset (distance) to the current locations. I googled it
and found using the CLHeading, we will get the trueHeading and
magneticHeading.
Using the following code snippet:
- (void)locationManager:(CLLocationManager *)manager
didUpdateHeading:(CLHeading *)newHeading {
CLLocationDirection true = [newHeading trueHeading];
CLLocationDirection magnetic = [newHeading magneticHeading];
}
Now i want to use this to add an offset to the current location (latitude
and longitude) in the direction i am heading.
Please help me to accomplish this. Thanks in advance.
No comments:
Post a Comment