AddVectorMap

AddVectorMap adds a new vector map. Returns a MapFrame object.

Syntax

object.AddVectorMap( GridFileName1, GridFileName2, CoordSys, AngleSys, AngleUnits)

Parameter

Type

Default

Description

GridFileName1

String

 

required; This provides the 1-grid vector map grid file name, or a two-grid X component (angle) grid file name.

GridFileName2

String

""

optional; This provide, two-grid vector map Y component (length) grid file name.

CoordSys

SrfVecCoordSys

srfVecCartesian

optional; This provides the two-grid vector map coordinate system.

AngleSys

SrfVecAngleSys

srfVecBearing

optional; This provides the two-grid vector map angle system for polar coordinates

AngleUnits

SrfVecAngleUnits

srfVecDegrees

optional; This provides the two-grid vector map unit type for polar coordinates

Example 1

This example demonstrates how to create a map coordinate system named MapFrame followed by its corresponding vector map named VectorLayer from the grid file named "demogrid.grd."

'declares MapFrame object and creates a new 1-grid vector map

Dim MapFrame As Object

Set MapFrame = Shapes.AddVectorMap(GridFileName1:=SurferApp.Path+"\Samples\demogrid.grd")

 

'declares VectorLayer object and sets the reference to the 1-grid vector layer

Dim VectorLayer As Object

Set VectorLayer = MapFrame.Overlays(1)

Example 2

This script displays all the methods and properties in the Shapes collection.

Used by: Shapes collection

See Also

VectorLayer Object

1-Grid Vector Map

2-Grid Vector Map