Configuring the default tools

ArcGIS for SharePoint contains a configuration file, DefaultTools.xml, that is used to define the default tools contained in the attribute table and pop-up windows within the Map Web Part. By editing this file, new Map Web Parts can be configured to display any of the available ArcGIS for SharePoint tools or a custom tool (add-in). Changes made in this file will apply to new Map Web Parts within the same site collection as the file being edited. Map Web Parts in other site collections or that have been created previously will be unaffected.

To edit the XML file, complete the following steps:

  1. Navigate to the library containing the configuration file using the Quick Launch links or the Site Actions menu, and click View All Site Content.
  2. Under the Document Libraries heading, click ArcGIS Mapping Configuration Files.
    Document Libraries file listing
    The document library opens.
  3. Check the DefaultTools.xml item.
  4. Click the Documents tab on the ribbon and click Edit Document (check out the document if necessary). The DefaultTools.xml file will open in your default XML editor.
  5. The following code is from the DefaultTools.xml file. Note that each tool resides in a <Tools> element within a <ToolPanel>. The Esri tools can be placed on any of the existing toolbars. To include a custom tool in the DefaultTools.xml file, you must first upload your add-in to the ArcGIS for SharePoint Extensions library.
    <ToolPanels xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:esri="http://schemas.esri.com/arcgis/mapping/2009">
      <ToolPanel Name="Attribute Table Toolbar" ContainerName="FeatureDataGridToolbarContainer" Orientation="Horizontal">
        <Tools>
          <Tool Icon="/_layouts/ESRI.ArcGIS.Mapping.SharePoint/Images/toolbar/SelectAllCommand16.png">
            <Tool.Class>
              <esri:SelectAllCommand />
            </Tool.Class>
          </Tool>
          <Tool Icon="/_layouts/ESRI.ArcGIS.Mapping.SharePoint/Images/toolbar/ZoomToSelectionCommand16.png">
            <Tool.Class>
              <esri:ZoomToSelectionCommand />
            </Tool.Class>
          </Tool>
          <Tool Icon="/_layouts/ESRI.ArcGIS.Mapping.SharePoint/Images/toolbar/ExportSelectionCommand16.png">
            <Tool.Class>
              <esri:ExportSelectionCommand />
            </Tool.Class>
          </Tool>
          <Tool Icon="/_layouts/ESRI.ArcGIS.Mapping.SharePoint/Images/toolbar/ClearSelectionCommand16.png">
            <Tool.Class>
              <esri:ClearSelectionCommand />
            </Tool.Class>
          </Tool>
          <Tool Icon="/_layouts/ESRI.ArcGIS.Mapping.SharePoint/Images/toolbar/ToggleFilterFeaturesByMapExtentCommand16.png">
            <Tool.Class>
              <esri:ToggleFilterFeaturesByMapExtentCommand />
            </Tool.Class>
          </Tool>
        </Tools>
      </ToolPanel>
      <ToolPanel Name="Popup Toolbar" ContainerName="PopupToolbarContainer" Orientation="Horizontal">
        <Tools>
          <Tool Icon="/_layouts/ESRI.ArcGIS.Mapping.SharePoint/Images/toolbar/DeleteGraphicCommand16.png">
            <Tool.Class>
              <esri:DeleteGraphicCommand />
            </Tool.Class>
          </Tool>
          <Tool Icon="/_layouts/ESRI.ArcGIS.Mapping.SharePoint/Images/toolbar/EditShapeCommand16.png">
            <Tool.Class>
              <esri:EditShapeCommand />
            </Tool.Class>
          </Tool>
          <Tool Icon="/_layouts/ESRI.ArcGIS.Mapping.SharePoint/Images/toolbar/EditValuesCommand16.png">
            <Tool.Class>
              <esri:EditValuesCommand />
            </Tool.Class>
          </Tool>
          <Tool Icon="/_layouts/ESRI.ArcGIS.Mapping.SharePoint/Images/toolbar/AddAttachmentsCommand16.png">
            <Tool.Class>
              <esri:AddAttachmentsCommand />
            </Tool.Class>
          </Tool>
        </Tools>
      </ToolPanel>
    </ToolPanels>
    
  6. Make the desired changes and save the file.
  7. Check the file back in to the ArcGIS Mapping Configuration Files library.
11/30/2012