views:

365

answers:

5

After reading about Firefox's Geolocation functionality, which doesn't use GPS, I'm wondering what it would take for a browser (IE and/or Firefox) to be able to access a GPS device connected to a normal laptop/desktop computer?

So far the only technology I've found that seems to be able to do this is Google Gears' Geolocation API or device specific APIs such as this Garmin plugin.

Are there any other/better solutions? Browser plugins/extensions are fine for this purpose.

Update: I don't mind elevating the security privileges of the browser, using a plugin etc.

+3  A: 

I don't know of any browsers that support this right now, but the W3C Geolocation API is designed in such a way that a browser could use GPS to determine your location. (Right now I believe the only browser that actually does use GPS is Mobile Safari on iPhone 3.0.)

In Windows 7, the Location Platform can use any number of location provider plug-ins, including those for GPS devices. I don't believe IE8 officially has support for the W3C Geolocation API, but there are experimental versions that have supported it, so that may happen soon.

npdoty
Thanks. Yes the only browser I was aware of that could natively get the client's GPS coordinates was iphone Safari.
Matthew Lock
Firefox 3.5+ supports the Geolocation API. https://developer.mozilla.org/en/using_geolocation
Sean
@Sean - thanks for confirming that, but it doesn't actually get the coordinates from a GPS does it
Matthew Lock
+1  A: 

You may keep an eye on this thread at superuser.com: http://u.nu/8fiz3

~Chris

cimnine
thanks, that just confirms my view that Firefox can't actually connect to a GPS device yet. What a shame!
Matthew Lock
+1  A: 

If you are trying to implement some web based software that runs on a mobile platform you could consider writing your own driver for the GPS that listens on port 80 and then use an AJAX applet client side to query the GPS driver for the current GPS co-ordinates.

Zyris Development Team
Thanks. Do you know of any existing open source/commerical apps that do this?
Matthew Lock
Unfortunately not, if you are using a serial port GPS then you simply have to open the serial port and send it a NMEA command and you should start receiving telemetry. If its over USB/Bluetooth its a bit more complicated but there are plenty of tutorials on how to do it. I suggest checking out GPSBabel, it looks promising: http://www.gpsbabel.org/index.html
Zyris Development Team
A: 

This probably doesn't answer your question, but GPSd is the most helpful GPS package I've encountered. Alas, it doesn't support any flavor of Windows.

Max A.
A: 

Looks like this GPS in Browser tool will let IE actually get GPS coordinates via javascript from a connected GPS.

Matthew Lock