core-location

Stop Core Location updates then restart them with a timer

I was wondering if anyone could point me to (or paste in) some code to deal with turning off Core Location updates to save power. As far as I understand it, you should stop Core Location updates as soon as you get a reading of desired accuracy. If you don't get a good accuracy reading after a certain time, you should also stop updates (...

Monotouch - caching maps for offline use

Is there a way to cache map data for offline use? we're creating a guide app that will be used in areas where there is no reception and will need to display maps in this environment is this possible? Cheers w:// ...

Why call autorelease for iVar definition in init method?

Hi, I just familiarise myself with the CLLocationManager and found several sample class definitions that contain the following init method: - (id) init { self = [super init]; if (self != nil) { self.locationManager = [[[CLLocationManager alloc] init] autorelease]; self.locationManager.delegate = self; } ...

Returning a users lat lng as a string iPhone

Is there a way to return the users location as a string from a model? I have a model thats job is to download same JSON data from a web service. When sending in my request I need to add ?lat=LAT_HERE&lng=LNG_HERE to the end of the string. I have seen tons of examples using the map or constantly updating a label. But I cant find out h...

CLLocation is not nil but trying to print it out throws EXC_BAD_ACCESS

Sorry, this may be a noob question but I'm working with CoreLocation and this has be stumped. I'm looking up the currentLocation using a singleton that was recommended on this site and when I get the currentLocation object, it returns true to a not nil check. However, when I try to print out its description, it throws EXC_BAD_ACCESS. ...

MKAnnotations are being made successfully, however they sometimes fail to render on MKMapView

I'm working on an iPhone app using the 3.1.3 SDK, my app finds the users current location, displays it on a MKMapView and then finds nearby locations and renders them as MKAnnotations. My code is working, however sometimes the nearby annotations do not appear on the map. They are still being made as I see the correct data in the console ...

Core Location and speed measurements

Does anyone know if Core Location in the iPhone OS uses anything but simple vector math to calculate speed? I've read that the GPS system can provide speed measurements that can be accurate when position is not (I believe using the Doppler shifts of the signals). I've tried and failed to see if the iPhone does this. The question is basi...

iPhone link to map directions using string "current location" not lat and lng for saddr

I know there are numerous questions about how to construct a sharedApplication link to the maps app specifying the start and end address with coordinates. I've got that working no problem. Has anyone found a way to link with a source address generically specified as "current location". I ask because the scenario I'm working on having ...

Core Location in iPhone Simulator 3.2 (iPad)

So, i'm trying to port my app to iPad. I'm using CoreLocation. Apple says the iPad does have Location: Wi-Fi Digital compass Assisted GPS (Wi-Fi + 3G model) Cellular (Wi-Fi + 3G model) so it should be possible to get the position of my ipad (at least with 3g model) about 3km radius would be enought. but it doesnt work in simulator ...

monotouch compass overlaying mapview

Hi I need to display a small compass over the mapview. Is there a standard way of achieving this? It obv needs to update as the direction the phone is pointed in changes. w:// ...

Releasing instance if service not enabled?

I would just like to check if I have this right, I am creating an instance of CCLocationManager and then checking if location services are enabled. If it is not enabled I then report an error, release the instance and carry on, does that look/sound right? locationManager = [[CLLocationManager alloc] init]; BOOL supportsService = [locati...

iPhone SDK: Track users location using GPS

I have a few questions about CoreLocation and GPS. First, what method in core location is used to continually get the users current coordinates? And at what interval should these be retrieved? Second, should these coordinates be pushed into a NSMutableArray each time they are received, so that the array of coordinates will represent...

Confused by notation?

Would someone be so kind as to explain what is happening with the statement below. I an a bit puzzeled by <MKAnnotation> between id and mp, it not something I have seen before. id <MKAnnotation> mp = [annotationView annotation]; many thanks gary ...

MKReverseGeocoder server returned error: 503

Hi all, Currently i am developing an iPhone application where i have to show user's current city and location for which i am using Mapkit Framework.When i build the application it works fine and show me the exact city details .But right now when i try to build the application again application shows following error message in my log /...

Get CoreLocation Update before TableView population?

hi, i have the corelocation stuff in an uitableview controller. i actually want to get a distance from two locations and print that distance in a tableview cell. the problem is, that the tableview is filled before all the corelocation stuff happens. how can i make corelocation makes all updates before the table is filled? heres my cla...

Updating a deallocated UIWebView from a background thread

(Two edits follow the original body of this question, both of which modify the question pretty radically. Don't get hung up on the first part of this--while useful for contextual purposes, I've all but ruled out the original problem I was asking about.) As you can see from the title, I've programmed myself into a corner and I've got sev...

Why the CLLocationManager delegate is not getting called in iPhone SDK 4.0 ???

This is the code that I have in my AppDelegate Class - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { CLLocationManager *locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; locationManager.distanceFilter = 1000; // 1 Km ...

is <CLLocationManagerDelegate> necessary to get the users location?

the file that I need the users information in already has a -flipsideViewControllerDelegate-, so Is there a way that I can get the users location coordinates without using the CLLocationManagerDelegate thing? ...

How do I get the users location latitude and longitude?

I need to access the users location in this method contained in the mainViewController -(void)loadAnnotations{ [mapView removeAnnotations:mapView.annotations]; CLLocationCoordinate2D workingCoordinate; workingCoordinate.latitude= //here i need the users latitude workingCoordinate.longitude= //here i need the users longitude NSLog(@" th...

iphone simulator crashes when it tries to access user location

for some reason my code causes my program to crash. does anyone know why or how to fix it? NSLog(@"here"); CLLocation *location = [locationManager location]; [mapView removeAnnotations:mapView.annotations]; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; CLLocationCoordinate2D workingCoordinate = [location coordinat...