CoreLocationExample
About coreLocationExample

Learning Objectives
This Example demonstrates using the native CoreLocation Apple SDK to understand your device's general cardinal direction.
After studying this example, you'll understand how to grab the CoreLocation information from your device, and use it to rotate an image in your application for immediate feedback within the interface.
In the code, pay attention to:
- The initialization of and use of the
ofxiOSCoreLocationobject. startHeading()andstartLocation()methods of theofxiOSCoreLocationobject are called in thesetup(), telling native Apple SDKs to begin sending you the device's details.getTrueHeading(),getLatitude(), andgetLongitude()methods of theofxiOSCoreLocationbring back fun and useful geo-spatial data, used in both theupdate()anddraw()events.
Expected Behavior
When launching this app, you should see a screen with:
- A compass-like visual interface that rotates with your movement throughout space.
Instructions for use:
- Move around, point your device at your nearest landmark, and note its cardinal direction.
Other classes used in this file
This Example uses the following classes:
- ofxiOS (for compiling openFrameworks to an Apple iOS device)
- ofxiOSCoreLocation