The CreatePinMap method creates a pin map. Pin map properties are edited through the returned PinMap object.
Syntax
object.CreatePinMap( DataFileName, DataTableName, LocatingMethod, CoordUnits, AppendImage, PIDCol, XCol, YCol, LabCol, VarCol, LocationFileName, LocTableName, LocIDCol, LocXCol, LocYCol, UnknownToUnprojectedLatLon )
Parameter |
Type |
Description |
DataFileName |
String |
optional; data file name |
DataTableName |
String |
optional; table name if a database file is used |
LocatingMethod |
optional; locating method |
|
CoordUnits |
optional; coordinate units |
|
AppendImage |
Boolean |
optional; true to append the pin map to any existing maps |
PIDCol |
Integer |
optional; primary ID column, column A equals 1 |
XCol |
Integer |
optional; X coordinate column, column A equals 1 |
YCol |
Integer |
optional; Y coordinate column, column A equals 1 |
LabCol |
Integer |
optional; label column, column A equals 1 |
VarCol |
Integer |
optional; variable column, column A equals 1 |
LocationFileName |
String |
optional; if LocatingMethod equals mvPinLocOther, location file name |
LocTableName |
String |
optional; if LocatingMethod equals mvPinLocOther, table name if a database file is used |
LocIDCol |
Integer |
optional; if LocatingMethod equals mvPinLocOther, location ID column, column A equals 1 |
LocXCol |
Integer |
optional; if LocatingMethod equals mvPinLocOther, X coordinate column, column A equals 1 |
LocYCol |
Integer |
optional; if LocatingMethod equals mvPinLocOther, Y coordinate column, column A equals 1 |
UnknownToUnprojectedLatLon |
Boolean |
optional; if the current projection is unknown and the document is empty, true changes the document projection to unprojected lat/long |
Example
This example creates a pin map of selected US cities.
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
'Create a new map window
Set Plot = mvapp.Documents.Add(mvDocPlot)
'Declare PinMap as object
Dim PinMap As Object
'Create a Pin Map
Set PinMap = Plot.CreatePinMap( DataFileName:=mvapp.ApplicationFolder + _
" Samples\Pin.dat", LocatingMethod:= mvPinLocCoordinates, PIDCol:=1, XCol:=3, _
YCol:=4, LabCol:=2)
End Sub
Used by: PlotDocument object