Monday, 15 July 2013

gps - Location manager giving really bad coordinates -


I tried to write a coordinate using the core space, and it's running well, only one thing This is when it comes to coordinates.

This is the code that gets the coordinates.

  - (zero) viewDidoadload {[Super Viewedload]; Self.locationManager = [[CLLocationManager alloc] init]; LocationManager.delegate = self; LocationManager.desiredAccuracy = kCLLocationAccuracyBest; [LocationManager startUpdatingLocation]; } - (empty) Location Manager: (CLLocationManager *) Manager Update Store Locations: (CLLocation *) from the new location location: (CLLocation *) Old location {if (initial location == zero) self. Start position = new location; NSString * latitude string = [[NSString alloc] initWithFormat: @ "% g", newLocation.coordinate.latitude]; Latitude labels Text = latitude string; NSString * longitudeString = [[NSString alloc] initWithFormat: @ "% g", new location.Cordinate. Lame]; Drawing Labels Text = long-term string; NSString * horizontal record string = [[NSString alloc] initWithFormat: @ "% g", new location HirizontalAccuracy]; Horizontal sequential label Text = horizontal accuracy string; NSString * altitudeString = [[NSString alloc] initWithFormat: @ "% g", new location.Litidad]; AltitudeLabel.text = altitudeString; NSString * Vertical ACCC string = [[NSString alloc] initWithFormat: @ "% g", new location. Extracurricular Stability]; Vertical Ration Label.text = Vertical Acuracious String; CLLocationDistance distance = [get new location by comma: initial position]; NSString * distanceString = [[NSString alloc] initWithFormat: @ "% g", distance]; DistanceTraveledLabel.text = distanceString;   

}

This is giving me lat: 37.7858 long: -122.406 which is in the US, while I am running a code from Europe, Romania ...

Is it possible to run because of a simulator?

In addition to this, I know that the place has been removed from Location Manager: didUpdateToLocation, but I tried to:

  - (empty) Location Manager: (CLLocationManager *) Manager updated the location: (NSArray *) Places   

But I do not know how to access the elements of [the last object of the location].

that latitude & amp; The long combination is San Francisco, which is home base for many coming (staff via the posh luxury commuter bus) apple staff.

You can set the location on which your simulator is working very smoothly:

 You can set your preferred position in the iPhone Simulator

Latitude & amp; Longitude for Bucharest is "44.4325" & amp; "26.103889", as far as I know.

To access the elements of " [the last object of space] ", the object in that array will be an " coordinate " property if there is one If you are called " updated location: ", then that array always has at least one location (that you reach through " the last object " ).

No comments:

Post a Comment