Share via


Shapes property

Returns the Shapes collection for the specified map. Read-only.

Applies to

Objects:  Map

Syntax

object.Shapes

Parameters

Part Description
object Required. An expression that returns a Map object.

Example

    Sub AddShapeToMap()

  Dim objApp As New MapPoint.Application   Dim objMap As MapPoint.Map   Dim objLoc As MapPoint.Location
  'Set up application   Set objMap = objApp.ActiveMap   objApp.Visible = True   objApp.UserControl = True   Set objLoc = objMap.FindResults("Seattle, WA")(1)
  'Use Shapes property to add a shape to the map   Set objMap.Location = objLoc   objMap.Shapes.AddShape geoShapeRectangle, objLoc, 20, 10
  End Sub

Note  This sample code is specific for use in MapPoint North America; it is for illustration purposes only.