I have a bit of a situation. I was assigned a task to create a system that will take a KML file and update markers dynamically on a map. I'm currently generating the KML from a Wireshark Dissection and now need a way to take said data into a mapping tool. There are a few situations:
The basic idea in mind is like looking at Google Maps and watching your car move as it tracks your GPS location. But I need to make this tracking system work for a lot more targets than just one.
I'm sorry I currently have no foundation on where to start, but that's why I ask for your guidance. I've researched on ArcGIS, QGIS, Google Earth and Maps, but I haven't found a way to upload dynamically nor refresh the system.
Anything that could help me start finding a solution for this task will be appreciated.
Thank you for your time.
答案 0 :(得分:0)
我有使用传单js的经验,它允许你使用bing map,google map或opensource MapQuest来显示移动轨道和汽车跟踪(适用于GM OnStar)。我也正在为kml编码,以便在google earth上显示航班跟踪。
首先,我不确定是否可能:
因此,我将假设您的机器可以访问互联网。然后,有很多解决方案。
您可以尝试在http://leafletjs.com/上查看简单的教程 你会知道如何做到这一点。 此外,您还搜索了Google地球的示例(我可以在其上显示3D跟踪路线)。
希望得到这个帮助。
答案 1 :(得分:0)
除了地图之外,请参阅以下内容中的“动态更新Google地球上的数据”示例:
https://sites.google.com/site/canadadennischen888/home/kml/auto-refresh-3d-tracking
希望这有帮助......(以下是我的链接中的副本,其中讨论了用于3D Google地球的KML。但我相信如果你必须“不使用google-earth”,你可以将它变成2D。)
...
如何制作动态自动刷新3D跟踪:
准备RestFul服务以从DB生成KML文件 (样本如https://sites.google.com/site/canadadennischen888/home/kml/3d-tracking)
我的其他jsp代码将生成一个KMZ文件,其中包含指向Restful服务的链接。 KMZ文件有onInterval(如下图所示)
Jsp网页允许用户下载KMZ文件。
当Google地球打开KMZ文件时,Google地球会自动刷新以从该Restful服务获取新数据
每次刷新时,服务器都会向GE发送包含新数据的最新更新KML数据。
KMZ样本:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2"
xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<NetworkLink>
<name>Dennis_Chen_Canada@Hotmail.com</name>
<open>1</open>
<Link>
<href>http://localhost:9080/google-earth-project/rest/kml/10001/20002</href>
<refreshMode>onInterval</refreshMode>
</Link>
</NetworkLink>
</kml>