A thread-safe and type-safe collection for holding AcetateElements.
Object Model
Syntax
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 Basic | Copy 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
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
See Also