core-location

How to wait for location manager for the current location ?

Hi all, I am developing an iPhone application in which I want to show nearest restaurants based on the current location For that In the applicationDidFinishLaunching I am doing this : self.locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; locationManager.desiredAccuracy = kCLLocationAccurac...

CLLocationManger gives old location. How to get the new location?

Hi, I am using the CLLocationManger to update the current location. Though its giving me the location but the location I am getting is of much older timestamp. I am facing the problem in, how to force the locationcontroller to update the fresh location not the cached location. Currently I am using this tutorial...... http://www.mobil...

How do I detect if device doesn't have a sim card using iphone sdk?

i am using these methods to get my location.all works fine in simulator.but on real device it runs very fast.how do i slow this down,also how do i show error only once if the device have not sim inserted and also for user denied to use current location. here are the methods-- -(void)GetCurrentLocation { // Create the location manager i...

sendSynchronousRequest fails under 3.1.2 after "Don't Allow" location fetch

Hey guys, I'm having a problem with doing a sendSynchronousRequest failing. It only fails after I try to get the current geolocation and the user hits "Don't Allow". And it only happens under 3.1.2. (As far as I can tell. It works fine in 3.0.1.) Here's what I do: I set up a very basic test app, that has almost nothing in it. In appli...

Location permission alert on iphone with phonegap

How do you change the string on the alert saying: "(Appname/whatever it is) would like to use your current location"? Of course, I only want to change the appname part. Because when you use the framework phonegap, the string is VERY ugly, something like this: "/var/mobile/Applications/157EB70D-4AA7-826E-690F0CBE0F/appname.app/www/index....

iPhone sdk: location aware app design

Location aware app design I am trying to design and app which does following flow: 1. App starts 2. User can do many different tasks (encapsulated in various view controllers), one of task adds a record to the db 3. I want newly added record in DB contain lat/long for the current location The problem is that current location may not...

Core location problem.

I'm trying to find the current location and then use the geocoder to find the city,state. This is what I have: - (void)viewDidLoad { self.locationManager = [[[CLLocationManager alloc] init] autorelease]; locationManager.delegate = self; locationManager.desiredAccuracy = kCLLocationAccuracyNearestTenMeters; [locationM...

Geolocation API on Max OS X Snow Leopard

Has anyone written an application that uses the new location API in Mac OS X 10.6? There is a sample program that uses the same API for the iPhone OS, but the API is slightly different for Mac OS X, and Apple provides no sample program using it. Edit: I know how to use it, the API documentation is ok. It seems overly complex for simple...

Terminating our Application when clicking on "dont allow" when using corelocation framework

HI, In our application i am using corelocationframework when opening application a alert for allow and dont allow.when clicking on the allow for current location we will show current location.When clicking on the "Dont Application" we must terminate the applcation is there is any method to do that. ...

How can I get the coordinates of any given address using CoreLocation framework and not google Maps API?

Hi All, I'm interested in finding out the coordinates of "any" given address and not just the current location using only CoreLocation.Framework. I do not wish to use google maps API or yahoo maps or any other third Party maps API. Is it possible? How can I get the coordinates of any address? Thanks ...

How to find State location from iphone GPS?

Hello all I'm trying to add to my program that locates the person in GPS but sets a value to the State that person is in so example: GPS Locates person from his/her iphone then returns the state they are in so say its California then the state variable gets set to California as a string would someone have an example any help is apprec...

Persisting CoreLocation

I have a need to store the current location to 'disk' on the iphone if the application I'm writing is terminated. Then, when the app starts again, I want to restore this information. However, the CLLocation coordinate property is read only. What can I do to save this information between program invocations (and reapply it to a CLLoca...

Calculate distance between two latitudes/longitudes in MapKit / CoreLocation

Im looking to use the getDistanceFrom method in CoreLocation to determine distance between two points, but i get errors when trying to use CoreLocation... Im using 3.1.2. I have tried this, but returns an error: CLLocation *userLoc = [[CLLocation alloc] initWithCoordinate:appDelegate.mapView2.userLocation.coordinate]; CLLocation *poiLo...

Where to implement CLLocationManager

I have an app with a tab bar and 3 tabs. The current location of the user is going to be needed to be known on any of the three tabs. Would the best place to implement CLLocationManager be in the app delegate in this case? Is it ok (good practise?) to put the CLLocationManager delegate methods in the app delegate m file? Where would yo...

What differences are there between Core Location on the iPod Touch and iPhone?

I guess the GPS chip is only there on the iPhone. But for some reason, my iPod Touch seems to know my position anyways even without GPS chip. So what does that mean for Core Location? What do I have to consider when using Core Location both on the iPhone and iPod Touch? What are the differences? ...

is it necessary to give distance filter for acquiring best location?

I am using location manager in my application and i'm getting inaccurate location.I'm using below code for getting location locationManager.delegate = self; locationManager.desiredAccuracy = kCLLocationAccuracyBest; and in didupdatetolocation method i'm using this code. LatitudeData = [[NSString alloc] initWithFormat:@"%f",newLocatio...

How to put a cancel button on the locate me tab ?

Hi all , I am developing a location aware application with five tabs. In the application I have a tab called "locate me" .Tapping on it shows near by things . After tapping the locate me it first finds the location then based on the location it fetches near by things from the web service and then parses with the nsxmlparser and then ...

Large volume geocoding and distance checking

I am trying to write an app for a company that maintains a registry that is updated everyday. The app will have to take the user's location and display all the nearest locations that are in that registry. Thus far I have gotten the app to call out to google and get geocoding information for a small Plist that I came up with. However, con...

GPS precision in map kit isn't that precise as in Maps.app

Why is the precision of my location in Mapkit not as good as in the maps app? The accuracy is set to best. If i'm trying to get my location in maps.app i have an acc of 50m in my app i habe 500m. What am i doing wron :)? Any tipps to get a better result? Thanks for your help :) ...

How to get meters in pixel in mapkit?

Hey guys, I wanted to test the mapKit and wanted to make my own overlay to display the accuracy of my position. If i have a zoom factor of for example .005 which radius does my circle around me has to have(If my accuracy is for example 500m)? Would be great to get some help :) Thanks a lot. ...