AddColorReliefLayer

AddColorReliefLayer adds a new color relief layer to a specified MapFrame object. Returns a ColorReliefLayer object.

Syntax

object. AddColorReliefLayer( Map, GridFileName )

Parameter

Type

Default

Description

Map

MapFrame

required; This specifies the MapFrame object to which the color relief 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 contour map named ContourLayer from the grid file named demogrid.grd. It then creates a color relief map layer in the MapFrame with AddColorReliefLayer and names the layer ColorReliefLayer .

'declare MapFrame object and create a contour map

Dim MapFrame As Object

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

 

'declare the ContourLayer object set the reference to the contour layer

Dim ContourLayer As Object

ContourLayer = MapFrame.Overlays(1)

 

'declare the ColorReliefLayer object and add a color relief layer

Dim ColorReliefLayer As Object

Set ColorReliefLayer = Shapes.AddColorReliefLayer(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

See Also

ColorReliefLayer Object