core-location

What are the rules behind "X would like to use your current location" on the iPhone?

Using location-awareness on the iPhone triggers the "X would like to use your current location" - "Don't allow"/"OK". In the CLLocationManager documentation, it is stated: "The user has the option of denying an application’s access to the location service data. During its initial uses by an application, the Core Location framework promp...

How would I know iPhone is moving?

Hi, Is there any way to find, iPhone movement?. I need to know if iPhone is still i.e its not moving then do some thing or else if iPhone is moving(in vertical or horizontal direction) do some logic. Do I need to read accelerometer didAccelerate method. Or there is some other way like reading current location (lat/log) values. [I DON...

iPhone CoreLocation: Give user the option to re-enable location usage for an app

If a user declines permission for an app to use the user's location data, is there a way for the user to re-enable it later? Or for me to programatically give the user the option from within the app? ...

Disable location service in iPhone simulator?

I'd like to test what happens if my app can't get the location coordinates. Is it possible to disable the location service in the simulator, like on an iPod Touch with WiFI turned off? I still don't have my iPhone Developer Program certificate, so I can't test it on my device. Thanks in advance! ...

What thread are iphone delegate methods run in for webview and core location callbacks?

I have an issue that looks like a race condition with a webview callback and a location manager callback that interact with the same variables and an alert dialog - the dialog is created in the location callback and should be dismissed in the webview callback. I thought that the delegate callbacks for standard objects like the webview a...

iPhone Mapkit Blue Dot / User Location Region Zoom Question

Hey All, Is is possible to set a region based on a current location in a mapview only one time. I want my iphone app to get the current location, zoom into that current location, and then allow the user to scroll around. However, because my setRegion code is in my didUpdateToLocation function, every time the current location is updated...

How can i determine if iphones CoreLocation is using satellites or cell tower triangulation to find the current location?

I'm using CoreLocation to find a users current location and display it on a map. I want to show an icon with an antenna when the location is established using satellites and a icon with towers when it uses tower cell triangulation. In my test app i set the desired accuracy to be kCLLocationAccuracyNearestTenMeters if using tower cell tri...

iPhone Development: CoreLocation and MapKit

How bad is it to use Location Manager to retrieve the location information when MapView.showUserLocation is also TRUE? I have a situation where i want to show the blue dot to indicate the user's current location, and i want to record the user's current location after some time interval. Having said that, there may be situations where th...

Core Location Best Placement and User Interruption

Hi All, My application uses Core Location in three different views. It's working perfectly. In my first view, I subclass the CLLocationManager and use protocol methods for location updates to my calling class. Before I install the framework and code in my other classes, I was wondering: Is the protocol method the best way? What happ...

CLLocationDegrees problem

How do you make a CLLocationDegrees? It's not a float, so what is it? ...

Apple documentation incorrect about MKMapView -regionThatFits: ?

In the Apple documentation for the -regionThatFits: method of the MKMapView, it says that this will return a new region centered on the same point as the region that's passed in, only with the regions bounds corrected for the iPhone screen aspect ratio. This seems to be incorrect in implementation...before the call to this method, my re...

Simple question about MKMapView and the iPhone

Basically I want to show the users location plus a list of selected location on a map. It can even have the standard iphone annotations. But, I have no idea of the general steps I would take to achieve this. Would I use MKMapView, or Core Location, or both? Could someone give me a simple outline of steps to take, or a link to a good tuto...

Why MKCoordinateSpan changes?

When I debug code below, I see that span is changed by mapkit from what I have provided. span2 contains different numbers from what was provided. Why is this happening? - (void) viewDidLoad { [super viewDidLoad]; CLLocationCoordinate2D loc; loc.latitude = self.atm.lat; loc.longitude = self.atm.lon; MKCoordinateSpan...

Core Location - fallback, location caching and alternatives...

I have a few questions about Core Location. 1) Should the user refuse permission for my app to use core location, or core location is unavailable for some reason, is there a fallback? (Device Locale, for example?) 2)Can I cache a device's location for next time? Does Core Location do this itself? 3)I really need the sunset time in the...

Core Location question....

This tutorial on mobileorchard.com uses 2 classes (or 2 sets of .h and .m) to implement core location. Can I just use everything there in my existing class? How would I do that? Can I use my existing app delegate as a location delegate as well? Also, is the - (id) init { self = [super init]; if (self != nil) { self.lo...

Clever ways to better test GPS code using only the iPhone simulator?

I've been playing around with the iPhone SDK, using MapKit and Core Location. What are some of the tricks you can use to better test things... while still on the simulator (long before I have to try it out on my iPhone). Is there a way to use NSTimer and regularly get 'pretend' values for location, heading, speed, etc? The simulator o...

Forcing CLLocationManager updates - does it help or hurt?

I've been trying to find any way to optimize the performance of my location-based iPhone application and have seen some people mention that you can force location updates by starting and stopping your CLLocationManager. I need the best accuracy I can get, and the user in my case would probably like to see updates every few seconds (say,...

Is there a way to set a MKAnnotationViews callout to auto resize?

The problem I'm having is I'm doing reverse geocoding and the full address is getting cut off in the callout. Is there any way to set autoresizingsubviews to YES? Thanks Nick ...

Calculation route length

Hi, I have a map with about 80 annotations. I would like to do 3 things. 1) From my current location, I would like to know the actual route distance to that position. Not the linear distance. 2) I want to be able to show a list of all the annotations, but for every annotation (having lon/lat) I would like to know the actual route dist...

iPhone SDK: Do I need to ask user for permissions to use GPS?

In my iPhone application I need to use GPS (CoreLocation to be exact) to get current position of the device. I know that most (if not all) applications using GPS have a popup implemented asking the user to allow GPS access. Is that done automatically by the iPhone SDK or should I implement such functionality myself? I've tried to run my...