Adds a layer. When you add a layer you're adding it to the top of the collection.


Namespace: AspMap.Web
Assembly: AspMapNET (in AspMapNET.dll)

Syntax

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

Parameters

layerSource
An object expression representing the full file name of the map file or can be one of DynamicPoints, DynamicLayer, WmsLayer, TileLayer or SpatialDatabaseLayer object.

Return Value

The method returns a Layer object in case if the layer was added successfully and null(Nothing) in case of an error.

See Also