Geolocation API for Adobe AIR?

October 08, 2008
web

Mozilla recently announced a new project called Geode - which allows web sites to request your location using JavaScript. I assume this will be built into a future release of Firefox someday, but for now it's a Plugin.

Geode allows Firefox to support the Geolocation API Specification which is a JavaScript API for getting location information from a hosting device or web browser.

Here's a Code example:

navigator.geolocation.getCurrentPosition(function(pos) {
  alert( pos.latitude + ", " + pos.longitude );
})

Geode will ask for permission before giving the web site access to your location, here's a screen shot:

Screen shot of geode firefox plugin for location data

This is all pretty awesome, does Adobe plan on adding Geolocation API support to the Adobe AIR Platform?



Related Entries

2 people found this page useful, what do you think?

Comments

You can pull that information using the Google API google.loader.ClientLocation: http://code.google.com/apis/ajax/documentation/#ClientLocation
I agree with Anthony Prato and just to clarify, google.loader.ClientLocation does not ask the user for permission. I'm already using it on a site called kunstart.be but I give the users the option to opt out of geo-detection. google.loader.ClientLocation is considered to be low resolution, though I've found it to be accurate enough for my needs (400m) in my case. Gears also has a geo-location API, that requires user permission to install and, separately, permission to use geo-coding. It is considered much higher resolution and definitely works on Windows mobile devices as well. It also has information available on the mobile device and provider, the mast your connecting via, your altitude etc So to answer part of your question about AIR, well if your the style of AIR developer that uses HTML/Javascript then these methods are already available to you as you can pull in various libraries and google APIs into AIR.
Thanks for the link Anthony, but it looks like the google ClientLocation API uses the IP address to determine location. The Geode actually uses Wifi Triangulation (using Skyhook?s Loki technology) to determine the lat / lon.
Hi,
Mark Doherty is coming this Aug at Adobe Flash Platform Summit 2010 to Speaks on AIR 2.5 for Android. The summit will take place on 25 and 26 Aug'10. For details log on to adobesummit.com
Hi,
Mark Doherty is coming this Aug at Adobe Flash Platform Summit 2010 to Speaks on AIR 2.5 for Android. The summit will take place on 25 and 26 Aug'10. For details log on to adobesummit dot com

Post a Comment




  



Spell Checker by Foundeo

Recent Entries



foundeo


did you hack my cf?