AddImageLayer

The AddImageLayer method has been deprecated. Use the AddColorReliefLayer method instead.

AddImageLayer adds a new image map to a specified MapFrame object. Returns an ImageLayer object.

Syntax

object. AddImageLayer( Map, GridFileName )

Parameter

Type

Required/

Optional

Default

Description

Map

MapFrame

Required

This specifies the MapFrame object to which the Image 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 image map named ImageLayer from the grid file named demogrid.grd. It then duplicates the image map layer in the MapFrame with AddImageLayer and names the duplicate layer ImageLayer2 .

Dim MapFrame As Object

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

Dim ImageLayer As Object

Set ImageLayer = MapFrame.Overlays(1)

 

Dim ImageLayer2 As Object

Set ImageLayer2 = Shapes.AddImageLayer(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

ImageLayer Object