The Layers collection contains all the layers in a map document. The Layers collection provides the means to access the layers within a MapViewer map document.
Properties
Methods
Item*
*default method
Example
This example creates a Layers collection.
Sub Main
'Declares mvApp as an object
Dim mvApp As Object
'Creates an instance of the MapViewer Application
'object and assigns it to the variable named "mvApp"
Set mvApp = CreateObject("MapViewer.Application")
'Makes MapViewer visible
mvApp.Visible = True
'Declares Plot as an object
Dim Plot As Object
'Creates a map document in MapViewer and
'assigns it to the variable named "Plot"
Set Plot = mvApp.Documents.Add(mvDocPlot)
'Declares PlotLayers as an object
Dim PlotLayers As Object
'Assigns the Layers collection to the
'variable named "PlotLayers"
Set PlotLayers = Plot.Layers
End Sub