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.

最新文章

  1. JDBC三层架构
  2. Mifare系列5-存储结构(转)
  3. MFC 阶段学习总结
  4. Nginx重新编译添加模块
  5. python 数字、字符串、列表常用函数
  6. Codeforces Gym 100513G G. FacePalm Accounting 暴力
  7. linux eval命令
  8. 百度贴吧图片抓取工具(Python)
  9. 字符串(KMP):BZOJ 3670 [Noi2014]动物园
  10. for语句之侦查队挑选人、猴子吃桃、5个小朋友算年龄、1 () 2 () 3 ()4 = 4;问括号里我要填 (- 或 +)问题
  11. Oracle11G 在线重定义
  12. CTF入门指南(0基础)
  13. ThinkPHP3.2中英文切换!
  14. 【English Teradata】Strategizing Vantage Technology
  15. mysql保存乱码(C#)
  16. [福大软工] Z班 第4次成绩排行榜
  17. [转]常见的JavaScript内存泄露
  18. Centos7初始化脚本
  19. Windows系统不同磁盘间的扩容教程
  20. C# WinForm中添加用户控件

热门文章

  1. 微信小程序开发之下拉菜单
  2. SetROP2
  3. Xilinx SDSoc 加载opencv库
  4. 组合外键(FOREIGN KEY)
  5. ASP.NET Core MVC 视图
  6. Unity 自动寻路Navmesh之跳跃,攀爬,斜坡
  7. 洛谷P1654 产品排序(sort)
  8. nginx 反向代理配置 upstream
  9. according to tld or attribute directive in tag file attribute *** does not accept any expressions
  10. 如何使用localStorage?