AddRasterBaseMap

AddRasterBaseMap adds a new base (raster) map. Returns a MapFrame object. The AddRasterBaseMap method creates a base (raster) map. To create a base map from vector data or mixed vector and raster data, use AddVectorBaseMap.

Syntax

object. AddRasterBaseMap( ImportFileName, ImportOptions )

Parameter

Type

Default

Description

ImportFileName

String

required; It provides the path and file name including the file extension. An error is returned if a vector data file is specified.

ImportOptions

String

""

optional; It provides the import options string. See below for specific options for the various file types.

Remarks

ImportFileName must include a file extension. See the following links for more details on ImportOptions.

Extension

File Type

AN? ACR-NEMA

Medical Image [.AN1] [.AN2]

BMP

No import automation options are available.

DICOM3

Medical Image [.DIC] [.DCM]

ECW

ERMapper [.ECW]

EMF

Windows Enhanced Metafile [.EMF]

GIF

No import automation options are available.

GSI

Golden Software Interchange File [.GSI]

JPG

No import automation options are available.

PDF

Adobe Portable Document Format [.PDF]

PLT

Golden Software PlotCall [.PLT]

PNG

No import automation options are available.

PNM/PPM/PGM/PBM

No import automation options are available.

RGB SGI-RGB

No import automation options are available.

SID

LizardTech MrSID Image [.SID]

SUN

No import automation options are available.

TGA

No import automation options are available.

TIF

No import automation options are available.

WMF

Windows Metafile [.WMF]

X AVS

No import automation options are available.

Example 1

This example demonstrates how to create a map coordinate system named MapFrame followed by its corresponding base map named BaseLayer from the graphic file named ca.gsb.

'declare MapFrame object and create a new base map

Dim MapFrame As Object

Set MapFrame = Shapes.AddRasterBaseMap(ImportFileName:=SurferApp.Path+"\Samples\demogrid.tif")

 

'declare RasterBaseLayer object and set the reference to the base layer

Dim RasterBaseLayer As Object

Set RasterBaseLayer = MapFrame.Overlays(1)

Example 2

This example demonstrates how to create a base map, specifying file import options.

'create a new base map

Plot.Shapes.AddRasterBaseMap(ImportFileName:=file_directory+"q1914ne.sid", ImportOptions:="Scale=16")

Example 3

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

Used by: Shapes collection

See Also

RasterBaseLayer Object

VectorBaseLayer Object

Base Map