I thought I’d share a spot of code with you, a new API in the flash.sensors package called Geolocation. The package itself is enabled for iPhone applications (created with Flash Pro Cs5), FL4 and AIR in the future enabling you to create context-aware applications with ease.
The coolest thing is that you can test your applications that feature Geolocation in Device Central Cs5, very cool.
var locale:Geolocation = new Geolocation();
lastLat = e.latitude;
lastLon = e.longitude;
gpsIcon_mc.visible = !gpsIcon_mc.visible;