当前位置: 首页 > news >正文

ARCGIS PRO SDK 创建右键菜单

ArcGIS Pro SDK中的弹出式右键菜单常见的在地图视图、布局视图、文件目录等地方,随便右键点击某个文件、要素、要素类,一般都会弹出一个右键菜单。

操作对象右键菜单  refID
要素图层esri_mapping_layerContextMenu
shp图层esri_mapping_unregisteredLayerContextMenu
图层组esri_mapping_groupLayerContextMenu
独立表esri_mapping_standaloneTableContextMenu
地图内容目录esri_mapping_mapContextMenu
地图视图框内选择要素esri_mapping_selection2DContextMenu

Config.daml中添加右键菜单

<controls>

             插入一下内容

</controls>

 <controls>
        <button id="MenuList_TestButton" caption="右键菜单" className="TestButton3" loadOnClick="true" smallImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue16.png" largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue32.png">
          <tooltip heading="Tooltip Heading">Tooltip text<disabledText /></tooltip>
        </button>
 </controls>

输入<updateModule>模块,代码如下

在</insertModule>下面

      插入一下内容

 </insertModule>
    <!--更新系统自带的工具菜单、工具栏等-->
    <updateModule refID="esri_mapping">
      <menus>
        <!--图层的右键菜单-->
        <updateMenu refID="esri_mapping_layerContextMenu">
          <insertButton refID="MenuList_TestButton" />
        </updateMenu>
        <!--图层组的右键菜单-->
        <updateMenu refID="esri_mapping_groupLayerContextMenu">
          <insertButton refID="MenuList_TestButton" />
        </updateMenu>
        <!--独立表的右键菜单-->
        <updateMenu refID="esri_mapping_standaloneTableContextMenu">
          <insertButton refID="MenuList_TestButton" />
        </updateMenu>
        <!--栅格图层的右键菜单-->
        <updateMenu refID="esri_mapping_rasterLayerContextMenu">
          <insertButton refID="MenuList_TestButton" />
        </updateMenu>
        <!--地图列表的右键菜单-->
        <updateMenu refID="esri_mapping_mapContextMenu">
          <insertButton refID="MenuList_TestButton" />
        </updateMenu>
        <!--地图视图内的右键菜单-->
        <updateMenu refID="esri_mapping_selection2DContextMenu">
          <insertButton refID="MenuList_TestButton" />
        </updateMenu>
      </menus>
    </updateModule>

相关文章:

  • 基于腾讯云HAI-CPU部署DeepSeek:搭建图书馆知识库,赋能智慧图书馆建设
  • 从技术架构和生态考虑,不是单纯的配置优化,还有哪些方式可以提高spark的计算性能
  • TCP 三次握手与四次挥手过程
  • Nordic Semiconductor 芯片(如 nRF52/nRF53 系列)的 VSCode 开发环境的步骤
  • 大型语言模型(LLM)推理框架的全面分析与选型指南(2025年版)
  • LLM之RAG实战(五十二)| 如何使用混合搜索优化RAG 检索
  • 鸿蒙进行视频上传,使用 request.uploadFile方法
  • 深入理解C#中的享元模式(Flyweight Pattern)
  • 感应电机反电动势频率与电源频率相等以及转差率的测量机制
  • 26考研——图_图的遍历(6)
  • 【C++】vector的push_back和emplace_back
  • 电动自行车/电动工具锂电池PCM方案--SH367003、SH367004、SH79F329
  • C# SerialPort 类中 Handshake 属性的作用
  • 基于springboot人脸识别的社区流调系统(源码+lw+部署文档+讲解),源码可白嫖!
  • 如何解决用户名文件夹是中文导致的识别不到路径,获取不到ssh密匙
  • 淘宝历史价格数据获取指南:API 与爬虫方案的合法性与效率对比
  • 大模型——字节跳动开源AI Agent框架Agent TARS:智能化自动化的新利器
  • 人工智能之数学基础:特征值和特征向量
  • 监控IP,网站将异常情况通过飞书机器人发至指定群内
  • xss-labs
  • 国家医保局副局长颜清辉调任人社部副部长
  • “80后”杨占旭已任辽宁阜新市副市长,曾任辽宁石油化工大学副校长
  • 西藏阿里地区日土县连发两次地震,分别为4.8级和3.8级
  • 央行副行长:我们在研究丰富政策工具箱,将适时推出增量政策
  • 最高法专门规范涉企案件审执工作:从源头防止趋利性执法司法
  • 艺术与医学的对话,瑞金医院办了一个展览