当前位置:网站首页>ArcEngine (1) Loading vector data
ArcEngine (1) Loading vector data
2022-08-03 08:02:00 【Prospector in the rice field】
利用MarControlControls add vector data
private void 加载矢量数据ToolStripMenuItem_Click(object sender, EventArgs e)
{
//打开文件对话框
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Title = "加载shapefile数据";//设置title
openFileDialog.Filter = "(*.shp)|*.shp";//Set the filter mode
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
//设置路径
string fullPath = openFileDialog.FileName;//全部路径
string path = fullPath.Substring(0,fullPath.LastIndexOf("\\"));//截取字符串:Except for the data before the name
string name = fullPath.Substring(fullPath.LastIndexOf("\\")+1);//一直截取到末尾
//添加图层
MapControl.AddShapeFile(path, name);
//Refresh basemap
MapControl.Refresh();
MessageBox.Show("文件加载成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
边栏推荐
猜你喜欢

实时目标检测新高地之#YOLOv7#更快更强的目标检测器

Roson的Qt之旅#104 QML Image控件

SSM整合流程

学习笔记:机器学习之逻辑回归
![[ 漏洞复现篇 ] yapi 代码执行 getshell 漏洞复现详解](/img/85/a4142689c22492cd898bd8275cd2c5.png)
[ 漏洞复现篇 ] yapi 代码执行 getshell 漏洞复现详解

【图像去噪】基于matlab稀疏表示KSVD图像去噪【含Matlab源码 2016期】

调用feign报错openfeign/feign-core/10.4.0/feign-core-10.4.0.jar

循环神经网络RNN基础《PyTorch深度学习实践》

Data warehouse buried point system and attribution practice

《21天精通TypeScript-5》类型注解与原始类型
随机推荐
pyspark df secondary sorting
【图像去雾】基于matlab暗通道和非均值滤波图像去雾【含Matlab源码 2011期】
【C语言】函数栈帧的创建和销毁详解
一文搞懂什么是@Component和@Bean注解以及如何使用
薛定谔的对象属性判断
DeFi明斯基时刻:压力测试与启示
How to choose a reliable and formal training institution for the exam in September?
使用pipreqs导出项目所需的requirements.txt(而非整个环境)
Oracle Rac Cluster File Directory Migration
最佳高质量字体
面试介绍项目经验(转)
学习Glide 常用场景的写法 +
[ 漏洞复现篇 ] yapi 代码执行 getshell 漏洞复现详解
JS函数获取本月的第一天和最后一天
Transformer、BERT、GPT 论文精读笔记
The ORB - SLAM2 extracting feature points
Karatsuba大数乘法的Verilog实现
安全狗云原生安全能力全面亮相全球数字经济大会暨ISC互联网安全大会
Evaluate:huggingface评价指标模块入门详细介绍
volta管理node版本