iphone - Mapkit lat- and longitude of current location -


I imagine this beautiful, but I do not search for it.

I want to show longitude the latitude of the current user position in two text fields, one for each value.

But it wont work defenatly.

I thought it would be easy with one of the following values ​​... but there are many more missing lat ...

  mapView.userLocation.coordinate.latitude MapView.userLocation.coordinate.latitude mapView.userLocation.location.coordinate.latitude mapView.userLocation.location.coordinate.longitude   

Does anyone know what I need to do Is that just need to get long and non-axial value?

Thank you in advance from Germany

User location is not yet available in viewDidLoad If it is also where the map is being started automatically.

A better place (MKUserLocation *) User Location {NSLog (@ "userLocation =% f,% F", mapView.userLocation.coordinate.latitude, mapView.userLocation.coordinate.longitude);

Also make sure that:

  • Show map view, check user location or set to yes
  • Representative set of map view

Comments