在网站地图上显示当前 GPS 或 GEO 位置
有没有办法使用手机或 GPS 接收器和 Google 地图(或类似的东西)在网站上显示您当前的位置?
基本上,我有一个在河上经营旅游业务的客户,他们希望显示他们当前的“实时”位置(每 10 - 30 秒更新一次)。
这可能吗?如果是这样,实现这一目标的最佳方法是什么?
Is there a way to display your current location on a website by using your phone or GPS receiver and Google maps (or something similar)?
Basically, I have a client that has a tourist business on a river and they wish to display their current 'live' location (Updating every 10 - 30 seconds).
Is this possible? And if so, what is the best way to achieve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Instamapper 是您需要的答案,但该服务将于 2012 年 12 月 13 日停止。他们有一个网页和手机上传您的 GPS 位置。之后我不确定这将如何完成。
Instamapper was the answer you needed, but that service goes away on 12/13/12. They have a web page and cellphones upload your GPS location. After that I'm not sure how this will be done.
该解决方案由两部分组成(我假设您的客户在河上的船上,地图应该显示船的位置;您的问题不太清楚):
第二点有现成的硬件部件。
The solution consists of two parts (I assume your client is on a boat on the river and the map should show the boat's location; your question isn't too clear):
There are off-the shelf hardware parts for the second point.
我制作了 Tracman 来让你做到这一点。您下载一款 Android 应用,它将您的位置发送到通过 websocket 的服务器。然后您将获得一个带有地图的 URL,您也可以将其嵌入到您的网站中。这是我网站上的示例。
I made Tracman to let you do this. You download an android app which sends your location to a server by websockets. Then you get a URL with a map, which you can also embed in your website. Here's an example on my site.
有许多用于 Goole 地图和地球的 API。
http://code.google.com/apis/maps/index.html
这可能是您将使用的语言。
http://code.google.com/apis/kml/documentation/
There are many API's for Goole Maps and Earth.
http://code.google.com/apis/maps/index.html
This will probably be the language you will use.
http://code.google.com/apis/kml/documentation/