Constructs a GeometryElement object.
Syntax
Parameters
- units
- Units for the coordinates within the Element of the GeometryElement
- element
- Element that defines the geometry for the GeometryElement
- symbol
- Symbol that defines how the GeometryElement is displayed
Example
This sample creates an acetate element, adds it to an acetate layer, sets the
minimum and maximum scales for the acetate layer, and adds the acetate layer to the
map.
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 and set minscale and maxscale AcetateLayer acetateLayer = new AcetateLayer("mapGraphics"); acetateLayer.MinScale = "1:1000000"; acetateLayer.MaxScale = "1:20000000"; // Add acetate layer to the map acetateLayer.AcetateElements.Add(acetatePt); mapView.Layers.Add(acetateLayer); |
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.MinScale = "1:1000000"
acetateLayer.MaxScale = "1:20000000"
acetateLayer.AcetateElements.Add(acetatePt)
mapView.Layers.Add(acetateLayer)
|
See Also