AE开发关于OnMapReplaced方法的使用原理
2024-08-28 08:06:24
The OnMapReplaced event is triggered whenever the IMapControl2::Map is replaced by another map, such as when the IMapControl2::LoadMxFile method is used or when the map property is explicitly replaced. Use this event to keep in synch with the current map.
问:这个方法在什么情况下被触发呢?
答:当MapControl 的地图被另一个地图替换时被触发。
问:为什么加载shp等数据时该方法不会被触发?
答:因为MapControl被初始化的时候就默认创建了一个地图文档,新加载的shp数据只是加载到了这个原始的地图文档中,并没有被替换,故该方法不会被触发。
问:那要怎么样才可以触发该事件?
答:加载地图文档,.mxd格式的数据就会触发该事件。
问:那我不想加载地图文档,只想加载shp数据该怎么实现鹰眼效果?
答:用OnAfterScreenDraw()方法。OnAfterScreenDraw is triggered after the IDisplayEvents::DisplayFinished event is called on the map's screen display. The hdc represents the device context on the screen display.
最新文章
- JDBC三层架构
- Mifare系列5-存储结构(转)
- MFC 阶段学习总结
- Nginx重新编译添加模块
- python 数字、字符串、列表常用函数
- Codeforces Gym 100513G G. FacePalm Accounting 暴力
- linux eval命令
- 百度贴吧图片抓取工具(Python)
- 字符串(KMP):BZOJ 3670 [Noi2014]动物园
- for语句之侦查队挑选人、猴子吃桃、5个小朋友算年龄、1 () 2 () 3 ()4 = 4;问括号里我要填 (- 或 +)问题
- Oracle11G 在线重定义
- CTF入门指南(0基础)
- ThinkPHP3.2中英文切换!
- 【English Teradata】Strategizing Vantage Technology
- mysql保存乱码(C#)
- [福大软工] Z班 第4次成绩排行榜
- [转]常见的JavaScript内存泄露
- Centos7初始化脚本
- Windows系统不同磁盘间的扩容教程
- C# WinForm中添加用户控件
热门文章
- 微信小程序开发之下拉菜单
- SetROP2
- Xilinx SDSoc 加载opencv库
- 组合外键(FOREIGN KEY)
- ASP.NET Core MVC 视图
- Unity 自动寻路Navmesh之跳跃,攀爬,斜坡
- 洛谷P1654 产品排序(sort)
- nginx 反向代理配置 upstream
- according to tld or attribute directive in tag file attribute *** does not accept any expressions
- 如何使用localStorage?