clllocation

iPhone Development - Pool for results

Basically i want to be able to call a single method that can pool for location and when found, return the CLLocation object. I want to know how can i pool for results? ...

Convert a Cocoa Touch latitude/longitude to a string without degree symbol

I'm trying to convert CLLocation latitude / longitude to a string. I can successfully do this with the follow code: // extract latitude from CLLocation object and cast to string NSString *latitude = [[NSString alloc] initWithFormat:@"%g°", location.coordinate.latitude]; this gives me a value like: 34.10111º. I would like this number...

UITableView doesn't populate when waiting for CLLocationManagerDelegate 's didUpdateToLocation method on iPhone SDK

I'm trying to populate a UITableview with an array of cells. I usually do this from the viewDidLoad method but this time I want to populate the array based on location. Below is the first line of my interface: @interface RootViewController : UITableViewController { In the implementation file the viewDidLoad method looks like this: ...

iPhone 3.0 Compass: how to get a heading?

I'm relatively new to Objective-C and really don't know much about it yet, so I apologise for what is probably a really amateurish question. I'm trying to get the magnetic heading from CLHeading and CLLocationDirection. However I'm getting compile errors for this line of code: locationLabel.text = [[[location course] magneticHeading] ...

CLLocationManager ensure best accuracy for iphone

Does anyone have any suggestions on how to obtain the best horizontal accuracy on the location manager? I have set the desired accuracy to NearestTenMeters, but given that the accuracy can always change depending on coverage area, how can I write some code in the locationManager to stop updating only after I get the best horizontal accur...

Convert NSNumber to CLCoordinate

I want to pull a list of coordinates from a database into an array (Before displaying them on a map). however, in the database they are of type Number, and I can't figure out how to convert them to coordinates. This doesn't work: Where I have an ATM object (The coordinates are for atm machines) with NSNumbers for latitude and longitude....

getting the speed at which device is moving

i am using cllocation.speed to get the speed of the device moving but i am getting 0 every time.....can anybody help me out with this even i am trying speed = ([newlocation getDistanceFrom:oldlocation]/[newlocation.timeStamp timeIntervalSinceDate:oldlocation.timeStamp]) the problem is it is giving worng speed once in a while...... ...

iphone SDK: MKPlacemark AdministrativeArea question

I'm using the MKPlacemark Class to populate a label with location specifics. When calling the AdministrativeArea property, the entire name of the US State is returned(ie West Virginia). Is there a way to return ONLY the initials(ie WV)? Thanks. ...

CLLocationDistance: Cant get "getDistanceFrom" to work.

view based app, .m - (void)viewDidLoad { [super viewDidLoad]; self.locationManager = [[[CLLocationManager alloc] init] autorelease]; self.locationManager.delegate = self; [[self locationManager] startUpdatingLocation]; } - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLoc...

Latitude, Longtitude from mapView.userLocation

Hello community, i have the following code to get the userLocation on my app: mapView.showsUserLocation=TRUE; mapView.userLocation.title=@"Aktuelle Position"; that is in the viewDidLoad(); but how can i get latitude and longtitude in from userLocation in the following method?? - (void)locationManager:(CLLocationManager *)manage...

Get Lat, Long from CLLocation

Hello i have an CLLocation which is my userLocation, now in another class i have to open the maps app and make a route from the userLocation to another point. But how can i get in the another class the Coordinates of userLocation? please help me i have no idea ...