Adds an AcetateElement to a collection.
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 |
---|
Dim pt As New Point(75.0, 45.0)
Dim symbol As New SimpleMarkerSymbol(Drawing.Color.Blue, 15, MarkerSymbolType.Circle)
Dim acetatePt As New GeometryElement(AcetateUnits.Database, pt, symbol)
Dim acetateLayer As New AcetateLayer("mapGraphics")
acetateLayer.AcetateElements.Add(acetatePt)
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