CompassRose Class |
Namespace: Telogis.GeoBase
The CompassRose type exposes the following members.
Name | Description | |
---|---|---|
CompassRose |
Create a new CompassRose object.
|
Name | Description | |
---|---|---|
Color |
The Color that should be used to draw the CompassRose.
Defaults to black.
| |
MapMouseEventsHandler |
Implementation of IMapMouseHandler. Returns the correct
handler for the user's action. Should not be
called directly. | |
RequiredRendermodes |
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
HitTest |
Implementation of IMapMouseHandler. Checks to see if the
Compass Rose should respond to the user action. Should not be
called directly. | |
Render |
Implementation of IMapRenderer. Used to draw the
information balloon. Should not be called directly. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
EnableGui |
When true the user may interactively rotate the map
by dragging the compass rose.
| |
Size |
The radius of the compass rose, in pixels. Default is 20.
| |
X |
The X pixel location of the center of the rose (measured from top left-hand corner). Default is 50.
| |
Y |
The Y pixel location of the center of the rose (measured from top left-hand corner). Default is 50.
|
In this example image above the Compass Rose is drawn in the top left-hand corner and has been used to rotate the map (of Long Island, New York) clockwise approximately 100 degrees (positive angles are always clockwise). Note the orientation of labels does not change when the map is rotated.
This class is not guaranteed to be thread safe - a different instance should be used on each map.
// set up the RendererList (allows us to draw multiple objects on a map) RendererList rList = new RendererList(); mainMap.Renderer = rList; ... // create a new CompassRose CompassRose cr = new CompassRose(); // cr.X = mainMap.Right - 50; // ^^ uncomment to position the CompassRose on the top-right corner // cr.EnableGui = false; // ^^ uncomment to disable user interaction with the CompassRose // add the CompassRose to our RendererList rList.Add(cr);