CreateDensityMap

 

The CreateDensityMap method creates a density map.  The density map properties can be edited through the returned DensityMap object.

 

Syntax

object.CreateDensityMap( BoundaryFileName, DataFileName, DataTableName, BoundaryFileOptions, PIDCol, VarCol )

 

Parameter

Type

Description

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

VarCol

Integer

optional; variable column, column A equals 1

 

Example

This example creates a density map of Texas.

 

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 DensityMap as object

Dim DensityMap As Object

 

'Create a density map

Set DensityMap= Plot.CreateDensityMap(BoundaryFileName:= _

mvapp.ApplicationFolder + "\Samples\tx2010.gsb", DataFileName:= _

mvapp.ApplicationFolder + "\Samples\tx2010.dat", _

BoundaryFileOptions:="AreasToCurves=0", PIDCol:=1, VarCol:=3)

 

End Sub

 

Used by: PlotDocument object