简体   繁体   English

Google Earth和Google Maps可以使用KML文件获取实时数据吗?

[英]Can Google Earth and Google Maps get live data using KML files?

I've read a little about KML files. 我已经阅读了一些有关KML文件的信息。 They are XML files that can be opened in Google Earth and Google Maps to display all kinds of data on the map. 它们是XML文件,可以在Google Earth和Google Maps中打开这些文件,以在地图上显示各种数据。 I have created a Google Maps application that displays thousands of dots representing thousands of IP addresses. 我创建了一个Google Maps应用程序,该应用程序显示代表数千个IP地址的数千个点。 The dots are red, yellow and green, depending on if they're offline, unstable or online respectively. 点是红色,黄色和绿色,具体取决于它们分别处于离线状态,不稳定状态还是在线状态。 The dots are also refreshed once per 5 seconds. 点也每5秒刷新一次。

I was intrigued by the mention of KML files, seeing as they can be opened in Google Maps and Google Earth both. 提到KML文件让我很感兴趣,因为它们可以在Google Maps和Google Earth中同时打开。 I have a few worries that I couldn't answer by Googling though: 我有一些担心无法通过Google搜索来解决:

  1. Can Google Earth be set to update the KML file from a URL live? 是否可以将Google Earth设置为通过实时网址更新KML文件? That way the dots would change colours in the application without the user having to manually 这样,点将在应用程序中更改颜色,而无需用户手动
  2. If I were to change my application to using KML files, would it still be a simple matter to fetch information about each dot using javascript? 如果我要将应用程序更改为使用KML文件,使用javascript获取有关每个点的信息是否仍然很简单?
  3. How does creation of Information Windows work in KML files? 在KML文件中如何创建Information Windows?

您需要在阅读网络链接网络链接该元素可以从网址加载KML(KMZ)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM