| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1371 人关注过本帖
标题:有没有人在研究《google earth API开发详解》一起研究啊
只看楼主 加入收藏
多布斯的喵喵
Rank: 2
等 级:论坛游民
帖 子:133
专家分:24
注 册:2011-3-29
结帖率:94.74%
收藏
 问题点数:0 回复次数:2 
有没有人在研究《google earth API开发详解》一起研究啊
14.zip (4.54 MB)

这段工程代码怎么就不能实现功能呢?
程序代码:
void CMyDlg::OnSearchs()
{
    // TODO: Add your control notification handler code here
    CStdioFile file;
    CString* strSearch;
    CString strTemp;
    CString pathName;
    int i(0);
    int count(0);
    strTemp="";
    CFileDialog geOpenDlg(TRUE);
    geOpenDlg.m_ofn.lpstrTitle="请打开批量搜索的数据文件";
    geOpenDlg.m_ofn.lpstrFilter="TXT Files(*.txt)\0*.txt\0ALL Files(*.*)\0*.*\0\0";
    if(IDOK==geOpenDlg.DoModal())
    {
        pathName=geOpenDlg.GetPathName();
        file.Open(geOpenDlg.GetPathName(),CFile::modeRead);
    }
    else
    {
        return;
    }
    while(file.ReadString(strTemp))
    {
        count++;
    }
    file.Close();
    file.Open(pathName,CFile::modeRead);
    strSearch=new CString[count];
    while(file.ReadString(strTemp));
    {
        strSearch[i]=strTemp;
        i++;
    }
    file.Close();
    m_geSearchControl.AttachDispatch(m_geApplication.GetSearchController(),TRUE);
    for(i=0;i<count;i++)
    {
        m_geSearchControl.Search(strSearch[i]);
    }
    i=0;
    IFeatureCollectionGE collect;
    strCount+=count;
    while(i<strCount)
    {
        collect=m_geSearchControl.GetResults();
        i++;
    }
    m_geFeature=new IFeatureGE[strCount];
    ((CListBox*)GetDlgItem(IDC_LIST1))->ResetContent();
    for (i=0;i<strCount;i++)
    {
        m_geFeature[i]=collect.GetItem(i+1);//卡住
        ((CListBox*)GetDlgItem(IDC_LIST1))->AddString(m_geFeature[i].GetName());
    }
    strFlag=new CString[strCount];
    for(i=0;i<strCount;i++)
    {
        strFlag[i]="";
    }
   
}
搜索更多相关主题的帖子: google earth 开发 工程 
2011-10-16 15:52
多布斯的喵喵
Rank: 2
等 级:论坛游民
帖 子:133
专家分:24
注 册:2011-3-29
收藏
得分:0 
非一定级别人物不太可能解决啊
纯粹原书代码
代码没有报错
运行实行批量搜索功能的不行……
2011-10-16 16:07
多布斯的喵喵
Rank: 2
等 级:论坛游民
帖 子:133
专家分:24
注 册:2011-3-29
收藏
得分:0 
使用前提是下载GOOGLE earth 客户端
2011-10-18 10:58
快速回复:有没有人在研究《google earth API开发详解》一起研究啊
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019878 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved