Search code examples
iphonegpsdirection

iPhone Direction Arrow?


I need to create an iPhone simple view that, based on the location of the user in the world, points the person to a never-changing Long/Lat location.

Is it possible to know this from the iPhone API?

Any examples?


Solution

  • This is possible on the current (3GS) iPhone, but not on earlier versions (which did not have a compass). The APIs that you'll need to use are in the CoreLocation.framework.

    Search the app store for "mecca" and you'll turn up many, many applications that do exactly what you're asking about. You'll also find several applications that let you drop a pin anywhere on the map and have the app point you to it.