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>
相关推荐
GIS地信小匠1 天前
(31)ArcGIS Pro 定义投影与批量投影:矢量数据坐标转换工具实操
arcgis·空间分析·数据处理·gis教程·arcgls pro
非科班Java出身GISer2 天前
ArcGIS JS 基础教程(3):地图缩放、平移、旋转(基础交互)
arcgis·arcgis js地图交互·arcgis js缩放·arcgis js平移·arcgis js旋转·arcgis js基础交互
城数派2 天前
2025年我国省市县三级的平均坡度数据(Excel\Shp格式)
arcgis·信息可视化·数据分析·excel
装疯迷窍_A2 天前
以举证方位线生成工具为例,分享如何在Arcgis中创建Python工具箱(含源码)
开发语言·python·arcgis·变更调查·举证照片
Trustport3 天前
ArcGIS Maps SDK For Kotlin 加载Layout中的MapView出错
android·开发语言·arcgis·kotlin
GIS地信小匠3 天前
(30)ArcGIS Pro 查找相同项+删除相同项:矢量数据去重实操
arcgis·空间分析·数据处理·gis教程·arcgls pro
城数派4 天前
2025年我国乡镇的平均高程数据(Excel\Shp格式)
数据库·arcgis·信息可视化·数据分析·excel
城数派5 天前
2025年省市县三级的平均高程数据(Excel\Shp格式)
数据库·arcgis·信息可视化·excel
非科班Java出身GISer5 天前
ArcGIS JS 基础教程(2):地图切换底图(天地图)
arcgis·arcgis js天地图·arcgis js切换底图·arcgis js底图·arcgis js自定义底图·arcgis js自定义地图
城数派5 天前
2025年全国地级市间驾车出行距离和出行时间矩阵数据
数据库·arcgis·信息可视化·数据分析