CreatePostMap

 

The CreatePostMap method posts data on a map. Posted data properties are edited through the returned PostData object.

 

Syntax

object.CreatePostMap( pVarCols, BoundaryFileName, DataFileName, DataTableName, BoundaryFileOptions, PIDCol )

 

Parameter

Type

Description

pVarCols

Array of Longs

required; array of column numbers, column A equals 1

BoundaryFileName

String

optional; boundary file name

DataFileName

String

optional; data file name

DataTableName

String

optional; table name if a database file is used

BoundaryFileOptions

String

optional; see Boundary File Options

PIDCol

Integer

optional; primary ID column, column A equals 1

 

Remarks

VB users can use ReDim to set the array size to the used size if necessary or use CreatePostMap2.

 

Example

This example creates a map of Colorado counties and posts the county name for each county.

 

Sub main

 

'Creates an instance of the MapViewer Application object

'and assigns it to the variable named "mvApp"

 Set mvApp = CreateObject("MapViewer.Application")

 

'Makes the application main window visible

 mvApp.Visible = True

 

'Assigns the location of the samples folder to the variable "InPath"

 InPath$ = mvApp.ApplicationFolder + " samples\"

 

'Creates a map document object, and assigns it to the variable named "Plot"

 Set Plot = mvApp.Documents.Add(DocType:=mvDocPlot)

 

'Defines the variables for a post map

 Dim Variables(1 To 1) As Long

 Variables(1) = 2

 

'Creates a post map object and assigns it to the variable named "PostMap"

 Set PostMap = Plot.CreatePostMap( Variables, BoundaryFileName:=InPath$ + _

 "co2010.gsb", DataFileName:=InPath$ + "co2010.dat", BoundaryFileOptions:= _

 "SecondaryIDField=2, Attribute1Field=1", PIDCol:=1 )

 

End Sub

 

Used by: PlotDocument object