如何通过javascript使用gps跟踪器设备检索当前位置? [英] How to retrieve current location using gps tracker device through javascript?

查看:92
本文介绍了如何通过javascript使用gps跟踪器设备检索当前位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I currently develop a real-time tracking system for my final year project. to track current location I have to use GPS tracker device. but I don't know how can I retrieve current location of the vehicle using javascript and display it's into HTML. can u give me suggestion what GPS tracker can I use to retrieve location using js?





我尝试了什么:



我只需要知道如何使用js检索数据位置



What I have tried:

I just need to know how to retrieve data location using js

推荐答案

我可能是错误或过时,但我认为这将属于出于安全原因我们不允许浏览器执行的操作,并且您将无法使用JavaScript连接到设备。



您可能需要让服务器组件访问设备并通过可以从JavaScript调用的Web服务向网页提供数据。
I may be wrong or out of date, but I think that would fall under "things we don't let browsers do for security reasons" and you won't be able to connect to the device with JavaScript.

You may need to have a server component accessing the device and serving data to the web page via a web service that you can call from JavaScript.


这篇关于如何通过javascript使用gps跟踪器设备检索当前位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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