cllocationmanager

iPhone - CLLocationManager init returns nil

Hi I am using a custom class to update user location. When initializing the class, I create a CLLocationManager object to be used by the class CLLocationManager *locManager = [[CLLocationManager alloc] init]; [self setLocationManager:locManager]; The line returning a nil is CLLocationManager *locManager = [[CLLocationManager alloc] i...

How To Find the Most Accurate iPhone GPS Results

Hi Everyone: I recall reading somewhere (I forget where) that if an iPhone application simply ran the CLLocationManager once, it didn't come up with the most accurate results. Is this accurate, and if so, how can I combat this problem? I want to come up with the most accurate GPS results, and am wondering if only one time will create ...

application crash only in iphone 3GS on airplane mode!

HI! my application works great on any device except for iphone 3GS on airplane mode. the crash comes up as soon as i open the app, which use a CLLOCATION data as soon as it starts. this fact leads me to the idea that the problem is with the CLLOCATION manager or something like that... anyone knows about a different between the location...

Cllocationmanager update oldlocation

Hi to all when i run my application its get my location(Lat,logi) both new and old location.But i want to set oldlocation as new location when my application run first time.Because i want to calculate distance travel. If i run my application it takes oldlocation where last location it get (saw distance travel 1 Km when i start applicatio...

CLLocation manager Gives me old position

Hello i used CLLoction manager to get location.but when ever i start my location then it gives me oldlocation which is store in device previously.i want to reset the location for this i used flag on first launch of application i used newlocation and call stopupdateinglocation and startupdatinglocation method.But oldlocation is not change...

check if a user allows the app to use their location

The first time the app tries to get the users location they are prompted with "Would like to use your current location" and they can hit Don't allow or ok. Is there any way to find out if the user has hit ok or don't allow? I'm trying to have the MKMapView show the users current location but I would like to take different actions based...

mkmapview.userslocation property set to 0,0 after allowing app to use current location

Hello, On the first time the user tries to use the current location the map.userslocation property has coordinates of 0,0. The next time I load the view containing the map the users location is always found. I am setting the map.showsUserLocation property to YES on viewDidLoad and when the map loads on the screen the blue dot is ther...

Unexpected number printed for CLLocation.coordinate.latitude

I have an NSLog statement in my -didUpdateToLocation method which prints the latitude of my location as expected: NSLog(@"%g", newLocation.coordinate.latitude); prints 37.3317 In the same method, i assign newLocation to a CLLocation instance variable for use elsewhere. self.selectedLocation = newLocation; But when i NSLog this usin...

CLLocationManager and degrees of heading in iPhone

Using the CLLocationManager object's didUpdateHeading event, how do I convert the resulting heading.x and heading.y values into degrees I can plot onto an image of a compass? ...

iPhone CLLocationManager TrueHeading iPhoneSimulator

In the iPhone Simulator the CLLocationManager's UpdateHeading gives a value of 103.27 for TrueHeading. I understand that these values are hard coded to Apple's world HQ in California. But shouldn't TrueNorth from CA be under 45 degrees? ...

Getting the calling object for didUpdateToLocation

Here's my situation: I have an app with 3 tabs. Tab 1 is a MKMapView. 2 is a navigation controller, with a table view, and 3 is going to be a table view with UI search bar or something different to the first two. So, for my mapview, on viewDidLoad i want it to get the users current location, go off to a webservice and then drop some pi...

multiple regionDidChangeAnimated calls - what gives?

I have a MKMapView inside a UITableView as a custom cell (don't ask ;) - don't know if it matters really), for which I register a regionDidChangeAnimated delegate method. This method gets called three times when the UITableView is loaded - once with the actual region and then two more times with a region that is way off. In the simulator...

how to retrieve magnetic value from CLHeading

Hi experts, i'm trying with CLHeading to get compass value, (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading { if (curHeading != nil) [curHeading release]; curHeading = newHeading; NSLog(@"%@",curHeading); [curHeading retain]; } the above give result as - magneticHeading 89.00 trueHeading ...

CLLocationManager saying I moved 1200+ft when I'm still sitting in my chair.

I'm getting strange readings when using CLLocationManager. The Lat/Long reported are spot on, but the distance traveled is WAY off. I've implemented the following delegate method as so: .h: CLLocationManager *mLocationManager; CLLocation *mStartDistance; And .m: - (void) locationManager:(CLLocationManager *)manager didUp...

Wifi Triangulation code in iPhone SDK.

Hi guys i did not do much using location in iPhone SDK. Can we implement wifi triangulation code in CLLocation. ...

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...

iPhone Core Location CLLocationManager update rate

Can you set up a constant time update rate for CLLocationManager to force it update locations like every 10 seconds continuously? I know the usage of the distance filter but what if something went wrong and the location is not updated? Thanks! ...

Problem With NSURLConnection and Location

Hello all , I am using the location manager to generate location data that I send in a URL to down load data. The first time I call the location manager, it correctly returns the current location and based on the current location I can fetch the data from the URL. However, when I attempt to retrieve the current location a second time...

Stop Returning Cached CLLocationManager Location

Hi Everyone: I am wondering if there is some way to make it so CLLocationManager doesn't automatically returned a cached location. I understand that the documents say "The location service returns an initial location as quickly as possible, returning cached information when available" but this cached location could be extremely far awa...

CLLocationCoordinate2D to CLLocation

Hello users, i have the following loop in my viewDidLoad: for(int i=1; i<[eventsArray count]; i++) { NSArray *componentsArray = [[eventsArray objectAtIndex:i] componentsSeparatedByString:@","]; if([componentsArray count] >=6) { Koordinate *coord = [[Koordinate alloc] init]; coord.latitude = [[componentsArray objectAtIndex...