Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Bracer

macrumors newbie
Original poster
Nov 24, 2009
14
0
The topic is a bit of a misunderstanding as MapKit uses Core Location itself.

You can get a lot of useful data from MapKit itself:
Code:
self.mapView.userLocation.location.coordinate.latitude
self.mapView.userLocation.location.coordinate.longitude
self.mapView.userLocation.location.altitude
self.mapView.userLocation.location.horizontalAccuracy
self.mapView.userLocation.location.verticalAccuracy
The only thing missing is true heading/magnetic heading.

I understand that having two location manager trying to get GPS location will cause the CPS track to go horribly wrong and crazy [seen it with my own eyes as the "user location" jumps all over the place] hence I'm trying to see if I could just get all the data I want from mapkit itself.

Any idea how I can get true heading/magnetic heading information from mapkit ?
 
Thanks dejo, unfortunately, it's course not true heading [immediate feedback upon rotation].
 
Thanks dejo, unfortunately, it's course not true heading [immediate feedback upon rotation].
So, the compass doesn't feed data to the course property? I don't know; I'm just asking. If it doesn't, seems like you are going to have to find some way to get CoreLocation and MapKit to play nice.
 
Ooo no Dejo :( The "Course" doesn't get its information from the compass, what it does is retrieve the "before" and "after" point of the CLLocation and then extrapolate the bearing a.k.a, what direction you are heading based on your previous location.

Added to the fact that the previous location might not even be your previous location at all but iPhone's internal attempt to localize you resulting in horribly wrong bearings.

But thank you dejo, you had been helpful :)
 
One is coming from google's Map Kit that uses CoreLocation.
The other is from me.
 
Wirelessly posted (Mozilla/5.0 (iPod; U; CPU iPhone OS 3_1_3 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7E18 Safari/528.16)

Does Map Kit still use a Core Location Manager even if you turn off showing the user location?
 
If you turn off showing the user location, no.

But no is so relative here, we don't really know what's going inside the MapKit Library, I did a test and confirm that all MapKit output [Latitude, Longitude bla bla bla] were shut down.

But did they "nil" and "release" their manager ? or just stop location update ?
Because if they were to just stop the location update, we will effectively have two location manager, one of which is mine, solely created just to get bearing
information from location manager.

Two location manager always spells bad news for iPhone development.
Have you seen the "I am here" blue dot jumping around crazily as if you are teleporting ? This is what will happen when two location manager talks to one GPS Chip. [atleast in the iPhone]

I am just hoping, since I can get so many information [PLUS VISUAL!] out of Mapkit, that I would be able to get heading out of it as well.

Any luck ?​
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.