ESRI.ArcGIS.ADF.IMS
Add Method
See Also  Example
ESRI.ArcGIS.ADF.IMS.Display.AcetateElement Namespace > AcetateElementCollection Class : Add Method




a
Adds an AcetateElement to a collection.

Syntax

Visual Basic (Declaration) 
Public Sub Add( _
   ByVal a As AcetateElement _
) 
Visual Basic (Usage)Copy Code
Dim instance As AcetateElementCollection
Dim a As AcetateElement
 
instance.Add(a)
C# 
public void Add( 
   AcetateElement a
)

Parameters

a

Example

This sample creates an acetate element, adds it to the AcetateElementCollection of the acetate layer, and adds the acetate layer to the map.
Visual BasicCopy Code
' Create the point and symbol for the acetate graphic

Dim pt As New Point(75.0, 45.0)

Dim symbol As New SimpleMarkerSymbol(Drawing.Color.Blue, 15, MarkerSymbolType.Circle)



' Create the acetate graphic

Dim acetatePt As New GeometryElement(AcetateUnits.Database, pt, symbol)



' Create the acetate layer

Dim acetateLayer As New AcetateLayer("mapGraphics")



' Add the graphic to the acetate layer's element collection

acetateLayer.AcetateElements.Add(acetatePt)



' Add acetate layer to the map

mapView.Layers.Add(acetateLayer)

C#Copy Code
// Create the point and symbol for the acetate graphic 

Point pt = new Point(75.0, 45.0); 

SimpleMarkerSymbol symbol = new SimpleMarkerSymbol(Drawing.Color.Blue, 15, MarkerSymbolType.Circle); 

  

// Create the acetate graphic 

GeometryElement acetatePt = new GeometryElement(AcetateUnits.Database, pt, symbol); 

  

// Create the acetate layer 

AcetateLayer acetateLayer = new AcetateLayer("mapGraphics"); 

  

// Add the graphic to the acetate layer's element collection  

acetateLayer.AcetateElements.Add(acetatePt); 

  

// Add acetate layer to the map 

mapView.Layers.Add(acetateLayer); 

    

See Also

© 2010 All Rights Reserved.