使用c#无法搜索谷歌地球?

时间:2014-08-30 07:22:22

标签: c# com google-earth-plugin

我遵循本教程

  

http://www.codeproject.com/Articles/31603/Embedding-Google-Earth-in-a-C-Application?fid=1532226&fr=26#xx0xx

在我的Windows窗体c#应用程序中嵌入谷歌。

这是我用于在Google地球应用中搜索的代码:

try
{
    SearchControllerGE srch = new SearchControllerGE();
    srch.Search(textBox7.Text);  //textBox7.Text = "India"
    FeatureCollectionGE fcge = srch.GetResults();
}
catch(Exception eXZ)
{
    MessageBox.Show(eXZ.Message);
}

srch.Search抛出异常是异常消息:

  

错误HRESULT E_FAIL已从调用COM组件返回

如果有任何人有关于通过COM API将c#应用程序与google earth链接的以前经验,请不要使用任何Javascript API帮助我。

1 个答案:

答案 0 :(得分:0)

  

通过COM API将c#应用程序与谷歌地球相关联,无需任何Javascript API。

The COM api has been depreciated for years