ESRI.ArcGIS.ADF.IMS
NorthArrow Class
Members  Example  See Also  Send Feedback
ESRI.ArcGIS.ADF.IMS.Display.AcetateElement Namespace : NorthArrow Class




A specific type of AcetateElement that displays north arrows.

Object Model

NorthArrow Class

Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class NorthArrow 
   Inherits AcetateElement
Visual Basic (Usage)Copy Code
Dim instance As NorthArrow
C# 
[SerializableAttribute()]
public class NorthArrow : AcetateElement 

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 BasicCopy 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

Some properties of NorthArrow are ignored by ArcMap Server image services. See individual properties for details.

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

© 2011 All Rights Reserved.