AddEmptyBaseMap

The AddEmptyBaseMap method adds a new empty base map. Returns a MapFrame object.

Syntax

object.AddEmptyBaseMap( xMin, yMin, xMax, yMax )

Parameter

Type

Default

Description

xMin

Double

required; specifies the minimum x coordinate value of the map

yMin

Double

required; specifies the minimum y coordinate value of the map

xMax

Double

required; specifies the maximum x coordinate value of the map

yMax

Double

required; specifies the maximum y coordinate value of the map

Example 1

The following example creates a new empty base map with the specified extents.

'declare MapFrame object and create an empty base map

Set MapFrame = Plot.Shapes.AddEmptyBaseMap (xMin:=-250, yMin:=-250, xMax:=250, yMax:=250)

Example 2

The following example creates a new empty base map and adds drawn objects.

'Add Empty Base Map

Set MapFrame = Plot.Shapes.AddEmptyBaseMap(xMin:=0, yMin:=0, xMax:=7, yMax:=5)

 

'Sets the empty base layer to the variable named BaseLayer

Set BaseLayer = MapFrame.Overlays(1)

 

'Adds a point to the new empty base map layer, specifying XY coordinates in map units

Set Symbol = NewBaseLayer.Shapes.AddSymbol(1,5)

Symbol.Name = "Point A"

 

'Adds a polygon to the new empty base map layer, specifying XY coordinates in map units

Dim Vertices(7) As Double

Vertices(0) = 1 : Vertices(1) = 5

Vertices(2) = 2 : Vertices(3) = 3

Vertices(4) = 4 : Vertices(5) = 5

Vertices(6) = 6.5 : Vertices(7) = 6.5

 

Set Polygon = BaseLayer.Shapes.AddPolygon(Vertices)

 

'Changes the polygon line color to magenta

Polygon.Line.ForeColorRGBA.Color = srfColorMagenta

Used by: Shapes collection