Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 Geolocation from external GPS

We have used HTML5s navigator.geolocation and found it to be very good on iOS and Android smartphones. Now the users want the same HTML5 web app to run on a laptop with external GPS. Using Windows 7 on the laptop I just can't figure a way to share the location to a HTML5 browser (tried Safari, FF, IE, Chrome). For testing I am using a GlobalStat BU-353 USB GPS which works standalone and I have found GPSDirect (cool freeware) to feed that signal to Win7 Sensor Location Services but still the HTML5 browsers do not see the GPS.

Anyone had any luck with this please ?

like image 945
ajayel Avatar asked Sep 08 '11 09:09

ajayel


2 Answers

I was looking for similar solution and found this: GpsGate. It is standalone application which connects to almost any GPS device and publishes it's data in several forms including browsers (through Javascript API which in turn makes jsonp call to http://localhost:12175/gps/[getVersion|getGpsInfo]?jsonp=padding). It's not compatible with Geolocation API, but I think writing simple adapter shouldn't take much time. Another good thing is that it's Express edition is free for both private and commercial use (link).

EDIT: After some digging I found this patch which adds geolocation compatible adapter for GpsGate to some other geolocation library.

like image 128
MeTTeO Avatar answered Oct 21 '22 06:10

MeTTeO


Issue 45535 is beginning to address this in the Chromium feature requests. As of Jan 5 2012, the feature has been marked as "started".

Feature request: http://code.google.com/p/chromium/issues/detail?id=45535

As long as you only need a single browser for your client solution (and not a universal solution) this will solve your problem.

A great method to start testing and keeping an eye out for this issue is to download Chrome Canary, which is usually 2 versions ahead of the Chrome release. I'm right now using v18 on Canary and it's great since I've been keeping an eye on the websocket schema changes.

You can find Canary here: http://tools.google.com/dlpage/chromesxs

like image 43
crockpotveggies Avatar answered Oct 21 '22 06:10

crockpotveggies