Reputation: 9219
There are few apps like Strava which records users movements using GPS. It also measures the elevation of the road on which they travelled.
I would like to know how can we measure elevation of the road using iPhone SDK?
Please let me know.
Upvotes: 1
Views: 2164
Reputation: 3867
Use the Google Elevation API
Example here
Then use a JSON parser to retrieve the values
Upvotes: 3
Reputation: 141
CoreLocation is what you want to use (although it is generally quite inaccurate I've found) first import the core location framework in the .h:
#import <CoreLocation/CoreLocation.h>
followed by in the .m:
- (void)locationUpdate:(CLLocation *)location {
altitudeLabel.text = [NSString stringWithFormat:@"Altitude - %f", [location altitude]];
}
This is given in height from sea level
Upvotes: 0