Google Earth COM API 将kml中的点显示在GoogleEarth中

Ecnujasper 2013-01-31 11:47:50
ApplicationGEClass GeApp = new ApplicationGEClass();
System.Threading.Thread.Sleep(10000);//等待GoogleEarth启动。
if (GeApp.IsOnline() != 0){
GeApp.OpenKmlFile("D://test.kml", 1);
}


程序如上所示,加载kml中的数据,好像没有效果,GoogleEarth中没有显示PlaceMark。

跪求,如何将kml中的点显示在GoogleEarth中。

test.kml
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
<Placemark>
<name>Stonehenge, England</name>
<description>Stonehenge was built around 2500BC</description>
<Point>
<coordinates>-1.826752,51.179045,0 </coordinates>
</Point>
</Placemark>
</kml>
...全文
324 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
bluepowerwzh 2013-03-05
  • 打赏
  • 举报
回复
此KML文件没有问题,我在VC++下加载成功,C#下没有试验

6,721

社区成员

发帖
与我相关
我的任务
社区描述
专题开发/技术/项目 Google技术社区
社区管理员
  • Google技术社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧