ESRI.ArcGIS.ADF.IMS
AcetateElementCollection Class
Members  Example  See Also 
ESRI.ArcGIS.ADF.IMS.Display.AcetateElement Namespace : AcetateElementCollection Class




A thread-safe and type-safe collection for holding AcetateElements.

Object Model

Syntax

Visual Basic (Declaration) 
<DefaultMemberAttribute("Item")>
<SerializableAttribute()>
Public Class AcetateElementCollection 
   Inherits ThreadSafeCollection
Visual Basic (Usage)Copy Code
Dim instance As AcetateElementCollection
C# 
[DefaultMemberAttribute("Item")]
[SerializableAttribute()]
public class AcetateElementCollection : ThreadSafeCollection 

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); 

    

Remarks

Acetate layers are designed to show a limited number of graphic features such as a northarrow, scalebar, some text, and one or two points, lines, or polygons. The acetate layer is not designed for displaying large numbers of features. If you add many features to an acetate layer, a noticeable degradation in response time and performance is likely. If too many features are added, the service may stop responding.

If using the map web control, you may find that the geometry and graphics classes in ESRI.ArcGIS.ADF.Web provide some equivalent functionality, and provide an alternative to overworking an acetate layer.

To add elements to an acetate layer, create the acetate layer, then add the elements to its AcetateElementCollection. You do not need to create the collection since the acetate layer creates its own collection on construction.

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.ADF.ThreadSafeCollection
      ESRI.ArcGIS.ADF.IMS.Display.AcetateElement.AcetateElementCollection

See Also

© 2010 All Rights Reserved.