
Hi,
I am developing an location based application. I want to get the current location in the Latitude and Longitude format. Please let's know how to get latitude longitude from CLLocation object?
Give me the code example of converting CLLocation object into Latitude and Longitude.
Thanks

Hi,
You can use the following code to retrieve Latitude and Longitude from CLLocation object.
NSString *lat = [[NSString alloc] initWithFormat:@"%g", newLocation.coordinate.latitude]; NSLog(@"Latitude: %@", lat); NSString *lng = [[NSString alloc] initWithFormat:@"%g", newLocation.coordinate.longitude]; NSLog(@"Longitude: %@", lng);
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.