如何在我们的网站上跟踪GPS [英] How to Trace GPS in our website
本文介绍了如何在我们的网站上跟踪GPS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的所有
如何从网络浏览器获取GPS位置
提前付款
Dreen
Dear all
How to Get GPS location from the web browser
Thanks in advance
Dreen
推荐答案
这项任务真的不是那么难:
你需要一个手机上的小应用程序:
That task isn''t really all that hard:
You''ll need a small application on your mobile phone that:
- 使用手机内置/外置GPS设备发现手机的纵向和纬度坐标(通常是海拔高度)还包括)。
- 将第一步中发现的信息与UTC时间戳和手机的ID(可能是一个简单的WebHttpRequest)一起发送到您的服务器。您还应该包含一个选项,让用户选择两次GPS测量之间的时间间隔或某个行程距离阈值。
您还需要在您的服务器上使用以下应用程序:
You''ll also need an application on your server that:
- 接收时间戳,长/纬度坐标加高程以及电话ID和存储这些在SQL数据库中。
- 在特定时间内查询数据库中某个电话ID的坐标
- 使用 Google Maps JavaScript API v3 [ ^ ]将点绘制到地图上。
- Receives timestamp, long/lat coordinates plus elevation and the phone ID and stores these in a SQL database.
- Query the database for coordinates of a certain phone ID within a certain timespan
- Generate HTML page utilizing Google Maps JavaScript API v3[^] to plot the points onto the map.
返回坐标数据时(可能是JSON格式)您应该考虑地图的缩放级别,以确保不会返回到彼此靠近的多个点可以辨别。
问候,
这篇关于如何在我们的网站上跟踪GPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文