来自外部GPS的HTML5地理位置 [英] HTML5 Geolocation from external GPS

查看:158
本文介绍了来自外部GPS的HTML5地理位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用了HTML5的navigator.geolocation,并发现它在iOS和Android智能手机上非常出色。现在,用户需要使用具有外部GPS的笔记本电脑运行相同的HTML5 Web应用程序。在笔记本电脑上使用Windows 7时,我无法想象将位置分享给HTML5浏览器(尝试过Safari,FF,IE,Chrome)。为了进行测试,我使用了独立工作的GlobalStat BU-353 USB GPS,我发现GPSDirect(酷酷的免费软件)可将该信号提供给Win7传感器定位服务,但HTML5浏览器仍然没有看到GPS。

任何人都有这样的幸运吗? 寻找类似的解决方案,并发现: GpsGate
它是独立的应用程序,可以连接几乎所有的GPS设备,并以多种形式发布其数据,包括浏览器(通过JavaScript API反过来使jsonp调用http:// localhost:12175 / gps / [getVersion | getGpsInfo] ?JSONP =填充)。它与Geolocation API不兼容,但我认为编写简单的适配器不需要太多时间。另一件好事是它的Express版本可免费用于私人和商业用途(链接)。



编辑:经过一番挖掘,我发现这个补丁为GpsGate添加了地理位置兼容适配器到其他地理位置库。


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 ?

解决方案

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.

这篇关于来自外部GPS的HTML5地理位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆