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>
相关推荐
Q一件事18 小时前
arcgis用累计值进行分级
arcgis
啦啦球晃晃1 天前
ARCGIS删除自定义的七参数转换
arcgis
百***35331 天前
node.js+npm的环境配置以及添加镜像(保姆级教程)
arcgis·npm·node.js
百***41663 天前
node.js+npm的环境配置以及添加镜像(保姆级教程)
arcgis·npm·node.js
农业遥感学子一枚3 天前
Arcgis用DEM影像计算坡度、坡向
arcgis
Jonathan Star4 天前
在 React 生态中,有多个成熟的 虚拟列表 npm 库
react.js·arcgis·npm
非科班Java出身GISer4 天前
ArcGIS JSAPI 学习教程 - 场景可视区域(SceneView visibleArea)显示以及过滤要素应用
arcgis·arcgis js 可视区域·arcgis 可视区域·arcgis 可视区域过滤·arcgis 过滤要素
GIS阵地5 天前
如何利用QGIS提取影像(多波段背景透明)边界,非包围框
arcgis·qgis·开源gis·地理信息系统·osgeo4w
qq_214803295 天前
ArcGIS Runtime与GeoTools融合实践:加密SHP文件的完整读写方案
java·安全·arcgis
Sylus_sui6 天前
Vue3实现PDF目录预览功能
arcgis