A specific type of AcetateElement that displays north arrows.
Object Model
Syntax
Visual Basic (Usage) | Copy Code |
---|
Dim instance As NorthArrow |
Example
This example creates a NorthArrow, sets some of its properties, adds it to a new AcetateLayer and adds the AcetateLayer to the map.
Visual Basic | Copy Code |
---|
' Create NorthArrow and set its properties
Dim arrowLocation As New Point(30, imgMap.Height.Value - 30)
Dim northArrow As New NorthArrow(AcetateUnits.Pixel)
northArrow.Location = arrowLocation
northArrow.AllowLabelOverlap = False
northArrow.Angle = 0
northArrow.Antialiasing = True
northArrow.OutlineColor = Drawing.Color.Red
northArrow.ShadowColor = Drawing.Color.WhiteSmoke
northArrow.Size = 24
northArrow.Style = NorthArrowStyle.Style4
northArrow.Transparency = 30
' Add NorthArrow to acetate layer and add to map
Dim acetateLayer As New AcetateLayer("mapGraphics")
acetateLayer.AcetateElements.Add(northArrow)
mapView.Layers.Add(acetateLayer) |
C# | Copy Code |
---|
// Create NorthArrow and set its properties
Point arrowLocation = new Point(30, imgMap.Height.Value - 30);
NorthArrow northArrow = new NorthArrow(AcetateUnits.Pixel);
northArrow.Location = arrowLocation;
northArrow.AllowLabelOverlap = False;
northArrow.Angle = 0;
northArrow.Antialiasing = True;
northArrow.OutlineColor = Drawing.Color.Red;
northArrow.ShadowColor = Drawing.Color.WhiteSmoke;
northArrow.Size = 24;
northArrow.Style = NorthArrowStyle.Style4;
northArrow.Transparency = 30;
// Add NorthArrow to acetate layer and add to map
AcetateLayer acetateLayer = new AcetateLayer("mapGraphics");
acetateLayer.AcetateElements.Add(northArrow);
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