AddLayerToLegend

The AddLayerToLegend method adds the specified layer's map information to the map legend. Returns a Legend object.

 

Syntax

object.AddLayerToLegend( LayerName )

 

Parameter

Type

Description

LayerName

String

required; layer to add to the legend

 

Example

This example adds the map information from a layer (named "Layer2")  to the map legend.

 

Map.AddLayerToLegend("Layer2")

 

Used by: Map object