CreateBaseMap

 

The CreateBaseMap method creates a base map. Returns a Layer object.

 

Syntax

object. CreateBaseMap( FileName, Options, AppendImage )

 

Parameter

Type

Description

FileName

String

optional; file name

Options

String

optional; see Boundary File Options

AppendImage

Boolean

optional; true to append the base map to any existing maps

 

Remarks

If the base map file does not contain a projection, your script may be interrupted by the What projection does this import file contain? dialog. To avoid this, use the Options parameter's UnknownProjectionTo option. If the projection is not Unknown, use the InputDataUnits option to specify the input data units. Both of these parameters must be defined with the enumeration value instead of the enumeration.

 

Example

This example creates a base map of the Colorado counties.

 

Sub Main

 

'Declare the variable that will reference the application

 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")

 

'Make MapViewer visible

 mvapp.Visible = True

 

'Declare Plot as Object

 Dim Plot As Object

 

'Creates a new map window

 Set Plot = mvapp.Documents.Add(mvDocPlot)

 

'Declare BaseMap as object

 Dim BaseMap As Object

 

'Create a base map

 Set BaseMap = Plot.CreateBaseMap(FileName:= mvapp.ApplicationFolder + _

 "\Samples\co2010.gsb", Options:= "AreasToCurves=0, PrimaryIDField=2, SecondaryIDField=1", _

 AppendImage:= True)

 

End Sub

 

Used by: PlotDocument object