行政区域边界提取

来源:互联网 发布:jquery获取表格数据 编辑:程序博客网 时间:2024/05/01 08:43

实现功能:使用WebBrowser和百度地图JS API 提取任意行政区域边界


最终效果展示这里写图片描述


提取结果:这里写图片描述


实现过程:
1.将html源文件载入到WebBrowser

        WebBrowser wb = new WebBrowser();        using (StreamReader sr = new StreamReader("1.html"))        {                String str = sr.ReadToEnd();                wb.DocumentText = str;        }

2.将调用html页面中的getBoundary方法

        object[] args = { "省、直辖市或县名称" };        wb.Document.InvokeScript("getBoundary", args);

相关下载
html页