FRAMES | NO FRAMES

 

B U S I N E S S   A N A L Y S T   10.0   R E S T   A P I   R E N D E R I N G   U T I L I T Y

Add Layers to Map Endpoint

Adds repository layer items to the default map.

 

Availability: Business Analyst Server 9.3.1 SP1.

 

URL Example

http://localhost/ArcGIS/baserver/REST/services/DefaultMap/BAServer/AddLayersToMap/execute

Parameters

Parameter

Description

LayerItems (required)

Layer items from the repository that will be added to the default map. Type array of esriLayerItem.

IsFullErrorMessage (optional)

Mode for composing error messages. Type boolean.

Default: false.

f (optional)

Response format. Type string. Available formats: HTML, JSON, PJSON, XML.

Default: HTML.

token

Authentication token. This parameter is required if your Business Analyst Server is secured. Type string.

Returns

Variable of type boolean whose value is always true.

Remarks

A layer is added to the map under the name specified with the LayerName parameter of its esriLayerItem instance. If this parameter is missing, the name of repository item is used as the layer name.

 

Layers temporarily added to the default map are removed when the Business Analyst Server Map Service restarts.

Example Usage

The example below adds a repository layer to the map.

 

NOTE: The example uses the "Drive Time Polygons 1" polygon layer already created in the Trade Areas folder of the San Francisco Tutorial Project of the Default Workspace.

 

request

http://localhost/ArcGIS/baserver/REST/services/DefaultMap/BAServer/AddLayersToMap/execute?
LayerItems=[
  {
    "LayerItem":{
      "WorkspaceName":"Default Workspace",
      "ProjectName":"San Francisco Tutorial Project",
      "folderType":"esriFolderTradeAreas",
      "itemName":"Drive Time Polygons 1"
    },
    "LayerTransparency":50,
    "LayerName":"MyLayer"
  }
]&
f=PJSON

 

NOTE: The request description has been abbreviated where "..." is noted.

 

Response

{
  "results":
  [
    {
      "paramName":"OutputStatus",
      "dataType":"GPBoolean",
      "value":true
    }
  ],
  "messages":
  [
  ]
}

 

See Also

Remove Layers from Map Endpoint

Business Analyst Server REST API Reference