如何将 KML 发送到本地运行的 Google-Earth?
(背景:我了解什么是 KML。我可以手动创建自己的 KML(例如使用文本编辑器)或编辑 KML 示例以用于我自己的目的。我找到了一个名为 JAK 的库来为我生成 KML。所以我知道如何创建我需要的 KML 对象,
但我似乎找不到任何有关如何在本地运行时将 KML 对象推送到 Google-Earth 的信息。谷歌地球在浏览器中运行。)
我有一个java应用程序,每x秒生成一个KML对象。当生成 KML 对象时,我需要将每个 KML 对象推送到 Google-Earth 上。 如何使用 Java 将 KML 对象推送到本地运行的 Google-Earth 上?
(Background: I understand what is KML. I am able to manually create my own KML (using like a text editor for example) or edit a KML example for my own purposes. I found a library to generate KML for me called JAK. So I know how to create the KML object's that I need.
I searched online and I can't seem to find anything about how you can push your KML object onto Google-Earth while it is running locally. Most of the info online is talking about google earth running in a browser.)
I have a java app that generates a KML object every x seconds. I need to push each of these the KML objects onto Google-Earth as the KML objects are generated. Using Java how do I push KML objects onto Google-Earth running locally?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
生成带有 NetworkLink 的 KML 文件,并让该 NetworkLink 每 X 秒刷新一次。这将允许 GE 中的自动刷新。
然后,让您的流程定期在适当的位置生成新的 KML。
Generate a KML with a NetworkLink to your file, and have that NetworkLink refresh every X seconds. This will allow for auto-refresh in GE.
Then, just have your process generate new KML at the appropriate place on a regular schedule.
您可以先将 KML 对象保存为临时 KML 文件,然后使用 KML 文件作为参数启动 Google 地球:-
我测试了它,它对我有用。
You could save the KML object as a temporary KML file first, then launch Google Earth with the KML file as a parameter:-
I tested it and it works for me.
查看 Chris Stayte 的代码,网址为 https://github.com/ChrisStayte/ArcMap_To_Google_Earth
他做了什么JonnyO 建议但在 C# 中并在与 ArcMap 同步的上下文中
Have a look at Chris Stayte's code at https://github.com/ChrisStayte/ArcMap_To_Google_Earth
He does what JonnyO suggests but in C# and in the context of synchronizing with ArcMap