I’d like to re-share a library that I created for the Radar application last year, designed to provide assistance for Geolocation, reverse geocoding, local weather, place names and a utility for determining the Sunrise and Sunset for a given latitude and longitude.
The reason for the library was not to create a wrapper over the already fantastic AIR API in Actionscript, but to provide a fallback. Following alot of testing with the Radar app, it became clear that quite often there were be occasions when a given mobile phone wouldn’t return a location in a decent timeframe. Further, to get the application working correctly on the desktop requires a method for locating the desktop.
Importantly, I’ve designed the API to use various methods of detection seamlessly. It will fallback from GPS to IP Lookup and even uses HTML if the SWF happens to be in a browser. So all you need to do is implement a simple interface and a GeoServices object.
You can see it in action here: