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>
相关推荐
ZHSH.2 天前
基于ArcGIS的台风轨迹及影响范围分析 | 追明月清风,也追台风
arcgis·时间动画
计算机软件大师3 天前
ArcGIS 10.8 软件安装教程
arcgis
非科班Java出身GISer3 天前
ArcGIS JSAPI 学习教程 - 要素图层(FeatureLayer)分类、分组设置可视化样式(ClassBreaksRenderer)
arcgis·arcgis js·arcgis 要素可视化·arcgis要素图层客户号·featurelayer可视化·arcgis属性可视化
杨超越luckly3 天前
HTML应用指南:利用POST请求获取中国一汽红旗门店位置信息
前端·arcgis·html·数据可视化·门店数据
GIS小小研究僧3 天前
GIS与农业 考公考编面试 几个参考题
arcgis·conda·gis·qgis·rs
杨超越luckly3 天前
HTML应用指南:利用GET请求获取全国沃尔沃门店位置信息
前端·arcgis·html·数据可视化·门店数据
小小弯_Shelby5 天前
arcgis api for javascript 修改地图图层要素默认的高亮效果
arcgis
ZHSH.5 天前
基于ArcGIS的作物适宜区分析案例 | 当GIS化身农科月老
arcgis·适宜性评价
装疯迷窍_A6 天前
ARCGIS国土超级工具集1.7更新说明
arcgis·插件·尖锐角·批量分割矢量·勘测定界
孙同学的一个笔记本6 天前
ArcGIS Pro 修改单个波段的值并组合输出新的影像数据
arcgis·arcgis pro·波段处理·栅格计算器