Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [[self delegate] currentDirectionLat:newLocation.coordinate.latitude Long:newLocation.coordinate.longitude];
- -(void)currentDirectionLat:(float)latitude Long:(float)longitude
- {
- prevLongitude = currentLongitude;
- prevLatitude = currentLatitude;
- currentLongitude = longitude;
- currentLatitude = latitude;
- NSString *latDirection = @"";
- if (currentLatitude > prevLatitude)
- latDirection = @"N";
- else if (currentLatitude < prevLatitude)
- latDirection = @"S";
- NSString *longDirection = @"";
- if (currentLongitude > prevLongitude)
- longDirection = @"E";
- else if (currentLongitude < prevLongitude)
- longDirection = @"W";
- if ([longDirection length] > 0)
- [lblDirection setText:[NSString stringWithFormat:@"%@%@",latDirection,longDirection]];
- }
Add Comment
Please, Sign In to add comment