当前位置:网站首页>ArcEngine (4) Use of MapControl_OnMouseDown
ArcEngine (4) Use of MapControl_OnMouseDown
2022-08-03 08:04:00 【Prospector in the rice field】
可以通过MapControl_OnMouseDown实现一些功能, Such as read coordinates, 放大, 选择等
static string function = string.Empty;
private void MapControl_OnMouseDown(object sender, ESRI.ArcGIS.Controls.IMapControlEvents2_OnMouseDownEvent e)
{
IEnvelope envelope;
IGeometry geometry;
switch (function)
{
case "coordinate":
MessageBox.Show("当前坐标为:" + e.x + "," + e.y+" "+mapUnit);
function = string.Empty;//对function进行清空
break;
case "zoomIn"://track方法
envelope = MapControl.TrackRectangle();
MapControl.Extent = envelope;
MapControl.Refresh();
function = string.Empty;
break;
case "select":
geometry = MapControl.TrackRectangle();
MapControl.Map.SelectByShape(geometry, null, false);
MapControl.Refresh();
function = string.Empty;
break;
}
}
private void 读取坐标ToolStripMenuItem_Click(object sender, EventArgs e)
{
function = "coordinate";
}
private void 拉框放大ToolStripMenuItem_Click(object sender, EventArgs e)
{
function = "zoomIn";
}
private void 拉框选择ToolStripMenuItem_Click(object sender, EventArgs e)
{
function = "select";
}边栏推荐
- [Kaggle combat] Prediction of the number of survivors of the Titanic (from zero to submission to Kaggle to model saving and restoration)
- @Async注解的坑,小心
- STL迭代器
- 【图像去噪】基于matlab稀疏表示KSVD图像去噪【含Matlab源码 2016期】
- 请求与响应:响应
- sqlite date field plus one day
- HCIP笔记整理 2022/7/18
- 2022用户画像构建
- 22-08-02 西安 尚医通(02)Vscode、ES6、nodejs、npm、Bable转码器
- pyspark df secondary sorting
猜你喜欢

Windows安装MySQL(MIS)

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

【云原生--Kubernetes】Pod容器与镜像拉取策略

训练正常&异常的GAN损失函数loss变化应该是怎么样的

依赖注入(DI),自动配置,集合注入

Docker启动mysql

Detailed explanation of cause and effect diagram of test case design method

《剑指Offer》刷题之打印从1到最大的n位数

mysql备份时的快照原理
![[Kaggle combat] Prediction of the number of survivors of the Titanic (from zero to submission to Kaggle to model saving and restoration)](/img/2b/d2f565d9221da094a9ccc30f506dc8.png)
[Kaggle combat] Prediction of the number of survivors of the Titanic (from zero to submission to Kaggle to model saving and restoration)
随机推荐
【云原生--Kubernetes】kubectl命令详解
服务器资源监控工具-nmon、nmon_analyser
Charles packet capture tool learning record
最佳高质量字体
sqlserver2019安装失败
如何在安装GBase 8c数据库的时候,报错显示“Host ips belong to different cluster?
Karatsuba大数乘法的Verilog实现
积分商城系统设计
实时目标检测新高地之#YOLOv7#更快更强的目标检测器
day12---接口和协议
mysql的innodb存储引擎和myisam存储引擎的区别
ArcEngine (six) use the tool tool to realize the zoom in, zoom out and translation of the pull box
[ 漏洞复现篇 ] yapi 代码执行 getshell 漏洞复现详解
mysql系统变量与状态变量
面试介绍项目经验(转)
集群
postman将接口返回结果生成json文件到本地
Mysql如何对两张表的相同字段,同时查询两张数据表
DSP Trick:向量长度估算
推荐系统-排序层-精排模型:LR、GBDT、Wide&Deep、DCN、DIN、DIEN、MMOE、PLE