Adds an encrypted layer to the Map control. When you add a layer to a Map you're adding it to the top of the Map layers collection; consequently its index is 0.


Namespace: ActualMap.Windows
Assembly: ActualMap (in ActualMap.dll)

Syntax

Visual Basic (Declaration)
Public Function AddLayer( _ 
   ByVal layerSource As Object,  _ 
   ByVal password As String _ 
) As Layer
C#
public Layer AddLayer(
   object layerSource,
   string password
)
C++
public:
 Layer AddLayer(
   Object layerSource,
   String password
) sealed 
J#
public Layer AddLayer(
   object layerSource,
   string password
)
JScript
public  function AddLayer(
   layerSource : Object,
   password : String
) : Layer

Parameters

layerSource
An object expression representing the full file name of the map file or can be one of DynamicPoints, DynamicLayer or SpatialDatabaseLayer object.
password
Specifies a password that must be supplied to open the layer.

Return Value

The method returns a Layer object.

Exceptions

Exception TypeCondition
ExceptionThrown if an error occurs.

See Also