AddContourLayer
AddContourLayer adds a new contour layer to a MapFrame object. Returns a ContourLayer object.
Syntax
object. AddContourLayer( Map, GridFileName )
Parameter |
Type |
Default |
Description |
Map |
required; This specifies the MapFrame object to which the contour map layer is added. |
||
GridFileName |
String |
required; This provides the path and file name of the grid file. |
Example 1
This example demonstrates how to create a map coordinate system named MapFrame followed by its corresponding color relief map named ColorReliefLayer from the grid file named demogrid.grd. It then creates a contour map layer in the MapFrame object with AddCountourLayer and names the layer ContourLayer.
'declare MapFrame object and create a color relief map
Dim MapFrame As Object
Set MapFrame = Shapes.AddColorReliefMap(GridFileName:=SurferApp.Path+"\Samples\demogrid.grd")
'declare ColorReliefLayer object and set the reference to the color relief layer
Dim ColorReliefLayer As Object
Set ColorReliefLayer = MapFrame.Overlays(1)
'declare ContourLayer object and add the contour layer to the map
Dim ContourLayer As Object
Set ContourLayer = Shapes.AddContourLayer(Map:= MapFrame, _
GridFileName:=SurferApp.Path+"\Samples\demogrid.grd")
Example 2
This script displays all the methods and properties in the Shapes collection.
Used by: Shapes collection