core-location

What's the easiest way to get the current location of an iPhone?

I already know how to use the CLLocationManager, so I could do it the hard way, with delegates and all that. But I'd like to have a convenience method that just gets the current location, once, and blocks until it gets the result. ...

How can i determine if location information returned by CLLocationManager is valid?

How can I determine if location information returned by CLLocationManager is valid? ...

iPhone development - Locate address from user's position

Hi Is it possible to get the street/area where the user currently is by using the CoreLocation framework? So if I get the user's longitude and latitude position, can I get the address (xx street, yy city, z state) from that position? Thanks. Someone had already posted the question before. Just found out http://stackoverflow.com/questi...

iPhone CoreLocation: How to get the most accurate speed

I'm experimenting with adding the GPS functionality to my iPhone app. It's a workout app that will be used while walking or running. So what I want to use GPS for is to show the speed that the person is moving in Mph and minute/mile. How should I configure the CLLocationManager so I get the best possible results? What should I set desir...

Accessing location information on iPhone from web application

Is there any way for a web application to access the location data of an iPhone without the installation of an additional iPhone client app? If not, the next best thing would be if any can recommend an existing native app, preferably free to the end user and as lightweight as possible, that does expose this information to Mobile Safari....

Get current location using Wi-Fi?

How to get current location using Wi-Fi towers in iPhone without using GPS? Actually I have an old iPhone which does not contain any GPS. So I want to find my current location using Wi-Fi or by using any other method. ...

Testing CoreLocation on iPhone Simulator

Is there anyway to test CoreLocation on the iPhone Simulator? All I require is to be able to set the location myself and have CoreLocation return it. ...

iPhone 3G: How to show locations around a fixed point?

Hi, I have my current location fixed via CoreLocation. Now I want to get those locations (from an existing database), which are in the near (about 100 feet) of it. How do I start? Update: Here is a implementation of the Haversine formula: http://www.jaimerios.com/?p=39 (very useful) ...

Ia there a way to get or calculate true north in cocoa touch?

Hello I am would like to determine a direction moving x degrees clockwise starting on true north. Is there a way for me get or calculate true north based on a set of lat & long coordinates? I am interested in implementing this cocoa touch. I am sure this is used in many of the applications already out there. Any comments, pointers, adv...

What's best practice for a long running operation that updates data in a currently displaying iphone tableview?

Background: I have a tableview displaying about 8 sections each backed with my own PlaceList class representing a list of objects (the implementation uses an NSMutableArray). There are around 200 objects in total. Each section corresponds to how far away the object is from the current location (e.g. within 1 mile, within 10, 25, 50...et...

NSSortDescriptor for comparing CLLocation objects in Cocoa/iPhone

I have an array of CLLocation objects and I'd like to be able to compare them to get distance from a starting CLLocation object. The math is straight forward but I'm curious if there is a convenience sort descriptor to go about doing this? Should I avoid NSSortDescriptor and write a custom compare method + bubble sort? I'm usually compar...

Optimizing CLLocationManager/CoreLocation to retrieve data points faster on the iPhone

Hi all, I'm currently using CoreLocation + CLLocationManager in order to compare a users current location to N amount of other locations. The problem I'm facing is I'm dealing with urban areas where locations are close to each other, so I need to pin point the location of the user as accurately as the device allows without sacrificing t...

How do I show the standard spin animation during a CoreLocation lookup on iPhone?

I don't want to just use a UIActivityIndicatorView -- I want the spinning animation that you see in the Maps application while you are doing a CoreLocation lookup. Do I have to create my own animation, or is there an easy way? edit: I'm referring to the standard Apple "Maps" application. Specifically I'm referring to the animation th...

How do I set up a view controller as a delegate for two things (such as the LocationManager and the Accelerometer)?

I'm sorry if my question title seems fundamentally uninformed. Let me explain what I am trying to do. I have defined the following UIViewController subclass, which fires up LocationManager, and has a Start Recording button to save a GPS track. Now I would like to also fire up the accelerometer and allow the user to record that as well....

CoreLocation Accuracy Woes

I have a program with a location manager set up like this: self.locationManager = [[CLLocationManager alloc] init]; [locationManager startUpdatingLocation]; locationManager.delegate = self; locationManager.distanceFilter = kCLDistanceFilterNone; locationManager.desiredAccuracy = kCLLocationAccuracyNearestTenMeters; I need the accurac...

showsUserLocation with Location Services disabled

I have an MKMapView in my app and have a button that turns on showsUserLocation for the map, while the map is finding the location I display a spinner so the user knows its working. I know when to stop the spinner by adding NSKeyValueObserver to the map's userLocation property. However if the user has Location Services disabled then the ...

What is the best way to architect a "find nearest" location-aware application on the iPhone?

I would like to build a location-aware application that automatically detects a user's location and presents them a sorted list of the nearest landmarks from a landmark database. The application will be built on the iPhone. The fundamental questions are: How to calculate the distances to nearby landmarks and sort by "closest" Where to...

Reasonable length of time to determine user's location iPhone

I'm writing a location based application, and I currently have an iPhone first gen, but I'm wondering how long it takes for an iPhone 3G or 3Gs to determine its location using the GPS chip ? As far as I understand it, locationManager:didUpdateToLocation:fromLocation: may keep getting called with more and more accurate location informati...

What thread calls the delegate when using iPhone CoreLocation framework?

If I create CLLocationManager, assign it's delegate, and finally tell it to start updating, exactly which thread is calling the delegate? Some system thread? ...

Storing a persistent CLLocation

I think I am missing something obvious somewhere. I have a (CLLocation *)lastqueriedlocation defined in the header as a property and synthesized. I want to updated it in locationManager:didUPdateToLocation:fromLocation: - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CL...