FRAMES | NO FRAMES

 

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

Remove Layers from Map Endpoint

Removes layers from the default map.

 

Availability: Business Analyst Server.

 

URL Example

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/RemoveLayersFromMap/execute

Parameters

Parameter

Description

LayerNames (required)

Names of layers to be removed from the default map. Type array of string.

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 true value means that at least one layer was removed.

Example Usage

The example below illustrates a workflow consisting of adding a repository layer to the map with the Add Layers to Map endpoint and removing it with this endpoint.

 

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.

 

STEP 1: Add a Layer to Map

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/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

 

STEP 2: Remove the Layer from Map

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/RemoveLayersFromMap/execute?
LayerNames=MyLayer&
f=PJSON

 

Response

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

 

See Also

Add Layers to Map Endpoint

Business Analyst Server REST Reference