How to handle the cllocationmanager and google api?
Iam developing one applciation.In that i use the google places api for getting the information about any location.ANd i used the cllocation manager for finding the specific location latitude and longitude values.And i pass that updated latitude and longitude values to that google api url in the cllocationmanager delegate method..After getting that values directly establish the connection with that url in the same cllocationmanager delegate menthod.i开发者_StackOverflow中文版t called every time and remaining nsurlconnection methods didn't give the result.So i want to get the updated location values at the first time and establish the connection and stop the location updated values process.So please tell me how to correct this one.Or is this right way or not for getting the current location details.Is there any other way for getting the current location details.
Use this code
[locationmanager stopUpdating];
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation {
//After you enter in this method get the newLocation.
[locationManager stopUpadatingLocation];
}
精彩评论