用 Java 构建 GPS 跟踪应用程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13476249/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Building a GPS tracking application in Java
提问by Sumudu
I need to build a (PC) software application to get readings from a GPS module and show the modules position in a map.
我需要构建一个(PC)软件应用程序来从 GPS 模块获取读数并在地图中显示模块位置。
The module will be attached to a robot, an aerial robot. It's preferred to show it's position on a Google map (or similar, if there's any) and update it in real time.
该模块将连接到一个机器人,一个空中机器人。最好在谷歌地图(或类似的,如果有的话)上显示它的位置并实时更新。
I don't have any prior experience regarding this kind of a matter. Actually, I don't even know whether this is possible. Any helpful information is highly appreciated..
我之前没有任何关于此类问题的经验。实际上,我什至不知道这是否可能。任何有用的信息都非常感谢..
回答by Hermann Hans
JXMapViewer
may help you accomplish what you are looking for. Here'sa somewhat dated article on how to use it.
JXMapViewer
可以帮助你完成你正在寻找的东西。这是一篇关于如何使用它的过时的文章。
The nice part is that you can change the backend to whatever mapping service provider you want (See here). The default uses OpenStreetMap.
好的部分是您可以将后端更改为您想要的任何地图服务提供商(请参阅此处)。默认使用OpenStreetMap。
EDIT: Using JXMapViewer will require the swingx-wsproject.
编辑:使用 JXMapViewer 将需要swingx-ws项目。
回答by user1680257
- You need a GPS module
- You need to interface the module with your PC (Application) to read GPS data. This depends on the connectivity the device provides.
- There should be vendor provided applications which comes with GPS module which will get you LA and LO (Geo details). Use them to dump this info to a file in a periodical way.
- Make you java app to look for any modifications in the file and get data. Now you could use this data to create paths with google map/ or wiki map
- 你需要一个 GPS 模块
- 您需要将模块与您的 PC(应用程序)连接以读取 GPS 数据。这取决于设备提供的连接。
- 应该有供应商提供的应用程序随 GPS 模块一起提供,这些应用程序将为您提供 LA 和 LO(地理详细信息)。使用它们以定期方式将此信息转储到文件中。
- 让您的 Java 应用程序查找文件中的任何修改并获取数据。现在您可以使用这些数据通过 google map/ 或 wiki map 创建路径