Determining your speed and heading
The availability of an on-board GPS unit makes it possible to determine your speed and heading. In this recipe, we will write a simple app that uses the
Geolocation
class to obtain and use this information. In addition, we will add compass functionality by utilizing the user's current heading.
Getting ready
You will need a GPS-enabled iOS device. The iPhone has featured an on-board GPS unit since the release of the 3G. GPS hardware can also be found in all cellular network-enabled iPads.
From Flash Professional, open chapter9\recipe2\recipe.fla
from the book's accompanying code bundle.
Sitting on the stage are three dynamic text fields. The first two (speed1Field
and speed2Field
) will be used to display the current ...
Get Flash iOS Apps Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.