Enabling dynamic layers on a map service in ArcGIS for Desktop

If you want to allow clients to change layer appearance and behavior in your map service, you can enable dynamic layers at the time you create the map service or after you've already published the map service. Dynamic layers can increase the amount of interaction that users are able to have with your maps. The way you enable dynamic layers is through the Service Editor in ArcMap.

To enable dynamic layers on your map service, follow these steps:

Steps:
  1. Display the Service Editor for the map service on which you want to enable dynamic layers. When you're creating a new map service, you'll see the Service Editor before you finish publishing. When you're modifying an existing service, you can display the Service Editor by right-clicking the service in the Catalog tree and choosing Service Properties.
  2. Click the Mapping tab and select Allow per request modification of layer order and symbology.

    If you want to dynamically add layers to your map service in a client application, you'll need to select workspaces that contain the layers you want to add.

  3. Click Manage.
  4. If a dynamic workspace you want to use is not listed in the Manage Dynamic Workspaces dialog box, add a new dynamic workspace by clicking Add.
  5. In the Add Dynamic Workspace dialog box, choose the type of workspace you want to add from the Workspace Type drop-down list. You can choose between enterprise geodatabases, file geodatabases, shapefiles, and raster datasets.

    The Workspace ID is automatically populated based on the workspace type. ArcGIS Server uses this ID to connect to the workspace when a client requests to add a layer in an application.

  6. Optionally, change the workspace ID. The ID can be any string of characters and contain spaces.
  7. Navigate to the workspace you want to use by clicking the ellipsis (...) button. Based on the type of workspace you selected, you'll be presented with the following options:
    • If you selected Database, locate the database connection you want to use and click Select. Additionally, you have the option of creating a new database connection to use as your dynamic workspace.
    • If you selected File Geodatabase, locate the geodatabase want to use and click Select. Additionally, you have the option of creating a new geodatabase to use as your dynamic workspace. Keep in mind that you'll need to add layers to that geodatabase at a later time.
    • If you selected Shapefile, choose the folder that contains the shapefiles you want to use and click Select.
    • If you selected Raster, choose the folder that contains the rasters you want to use and click Select.
  8. On the Add Dynamic Workspace dialog box, review your workspace parameters and click OK. If you selected an enterprise database as your workspace, you can optionally lock the database version that users can access by choosing Lock Version.
  9. On the Manage Dynamic Workspaces dialog box, choose the dynamic workspaces you want to use. You can choose more than one workspace at a time by holding down the SHIFT key while you select.
  10. Click OK.

Your map service is now configured with dynamic layers enabled. Supported clients will be able to change layer appearance and behavior dynamically.

Related Topics

12/18/2014