The DistanceOfTravel2 method creates a report of total travel distance between objects specified by primary IDs. This method is the same as the DistanceOfTravel method, except it takes the pointer to the array. VB users may want to call this method instead of DistanceOfTravel. Note: Golden Software does not officially support VB.
Syntax
object.DistanceOfTravel2( ppPIDS, AppendCoord, TraceJourney, DecimalDigits )
Parameter |
Type |
Description |
ppPIDS |
Array of Variants |
required; array of primary IDs |
AppendCoord |
Boolean |
optional; append map coordinates after the primary ID name |
TraceJourney |
Boolean |
optional; trace the journey on the map |
DecimalDigits |
Integer |
optional; number of digits to the right of the decimal |
Remarks
VB users can use ReDim to set the array size to the used size if necessary. See Coordinate Arrays for more information about creating arrays in MapViewer.
Example
This example loads a base map and traces the distance of travel between four locations.
'Load base map
Set BaseMap = Plot.CreateBaseMap(FileName:= mvApp.ApplicationFolder + _
"\Samples\co2010.gsb", AppendImage:= True)
'Create array for ppPIDS
Dim Travel(3) As Variant
Travel(0) = "08031"
Travel(1) = "08045"
Travel(2) = "08001"
Travel(3) = "08125"
'Create a distance of travel report and trace the journey on the map
CurrentLayer.DistanceOfTravel2(ppPIDs:=Travel, AppendCoord:=True, _
TraceJourney:=True, DecimalDigits:=3)
Used by: Layer object