This is an archive related to a previous version of Esri Maps for SharePoint. If you need the current version go to http://doc.arcgis.com/en/maps-for-sharepoint/.

Add extensions

Esri Maps for SharePoint comes with a standard set of tools and functionality, such as panning, zooming, selecting features, and routing. While the default tools cover a large range of functionality, you may want to develop custom functionality to fulfill your users' needs. Esri Maps for SharePoint provides an extensibility framework that allows you to develop tools and behaviors.

After you create your extensions, you add them to an extension pack. An extension pack consists of the tool or behavior code, custom picture marker sets, any supporting files, and a manifest file that lists the name and path to those modules, along with other optional properties. The extension pack format allows you to bundle multiple extension types into a single package that can easily be shared.

Although it is not required, it is generally a best practice to package tools, behaviors, and picture marker sets in separate, dedicated folders, as shown below.

Extension packs

Create an extension pack

Tools, behaviors, and custom picture marker sets must be packaged in collections named extension packs. These extension packs allow for easy deployment and sharing of tool or behavior collections.

To create an extension pack, do the following.

  1. Create your custom tool, behavior, or picture marker set. See Create a tool, Create a behavior, or Create a picture marker set.
  2. Create a manifest file named manifest.json.txt.

    The manifest included in an extension pack contains descriptions of the extensions within that extension pack; these include tools, behaviors, and picture marker sets. These descriptions, written in JSON format, outline the properties of each extension; for example, a tool's description must include name and location properties (and a label property for tools), but may also optionally include other initial properties. The path defined in the location property is relative to the location of the manifest file. The extension pack's name property is required.

    The following code illustrates a manifest file that lists a custom tool, a custom behavior, and a custom picture marker set. The name properties for tools and behaviors must match the name attributes specified in the tool collections and behaviors configuration files, respectively. The tool includes the required label property, which will appear in the application's UI, and an optional tooltip property, which defines the message that appears when a user hovers over the tool.

    { "name": "extensionPack", 
      "description": "Basic tool, behavior, and picture marker set examples",
        "tools": [{
            "name": "myTool", 
            "location" : "./tools/myTool.js",
            "label" : "My Tool",
            "tooltip" : "An example of a custom tool"
        }],
        "behaviors": [{
            "name": "myBehavior",
            "location" : "./behaviors/myBehavior.js"
        }],
        "pictureMarkerSets": [{
            "label": "Display Label",
            "description" : "My custom markers",
            "location": "./symbols/myPictureMarkers.json.txt"
        }]
    }
    

  3. Place the manifest file in a folder named according to the name property in the manifest.
  4. In the extension pack folder, create separate subfolders for tools, behaviors, and symbols, and place all related behavior, tool, and picture marker files in the appropriate folders.

    Although this is not required, it is considered a best practice.

    • For tools and behaviors, the subfolders (tools | behaviors) should include the tool or behavior's JavaScript file and any related resources files. (See Create a tool or Create a behavior.)
    • For picture marker sets, the subfolder (symbols) should include the picture marker set definition file and all related resource files, such as images. (See Create picture marker sets.)

  5. Zip the extension pack folder and place the zipped package in a location that can be accessed by Esri Maps for SharePoint.
  6. The extensions folder and its contents constitute your extension pack.

Add to SharePoint 2010 or 2013

To add an extension pack to SharePoint 2010 or 2013, do the following:

  • Add the extension pack to the Extensions list.
  • Add the extension pack to the Esri Maps Web Part.

Add to Extensions list

Prerequisite:

You must be an administrator on the SharePoint site to access the Esri Maps for SharePoint Administration menu.

  1. Browse to the site's Site Settings.
  2. Under Esri Maps for SharePoint Administration, click Manage Extensions.
  3. Click the Add extension packs drop-down arrow and choose one of the following:
    • Upload—Add an extension pack from your computer or other location. The extension pack must be compressed with a .zip file extension.
    • Link from SharePoint—Add an extension pack that already exists in the SharePoint site. The extension pack must reside in a document library on an accessible SharePoint site. The extension pack must not be compressed into a ZIP file; the entire extension pack including all folders and files must be uploaded to the document library. The manifest.json.txt file must be accessible at the root.
    • Link from Address—Add an extension pack from any website as long as it allows anonymous access for downloading. The extension pack must not be compressed into a ZIP file; the entire extension pack including all folders and files must be uploaded. The manifest.json.txt file must be accessible at the root.

Add to Esri Maps Web Part

  1. Edit the page and place the Esri Maps Web Part in Edit mode.
  2. Configure Click Configure to open the Configuration pane.
  3. Under Configure, click Tools or Behaviors, depending on which type of extension you want to add.

    When adding tools to the Main menu, tools must be placed under Analysis Tools or Share. Tools added to the root level will not appear in the Web Part.

  4. Click Add (+), expand the desired extension pack, and check the check box beside the extension you want to add.

    Add a tool

  5. Click Add and click OK.
  6. Click Apply or OK on the Esri Maps Web Part properties to save changes.
  7. Click Save to save the page.

Share an extension pack

You can share extension packs by packaging the extensions folder into an archive (ZIP file) and distributing the archive to your colleagues. Ensure that the folder contains all the custom tool and behavior JavaScript files, picture marker definitions, and the manifest.json.txt file, along with any other supporting files.