DirectionalPushPin Class |
Namespace: Telogis.GeoBase
The DirectionalPushPin type exposes the following members.
Name | Description | |
---|---|---|
DirectionalPushPin(LatLon) |
Create a directional pushpin with the heading set to 0.
| |
DirectionalPushPin(LatLon, Single, Int32) |
Create a new DirectionalPushPin with a given location, heading and icon.
|
Name | Description | |
---|---|---|
AlwaysOnTop |
Controls whether labels are always shown above other map elements.
(Inherited from PushPin.) | |
Heading |
Gets or sets the heading (in degrees) of this DirectionalPushPin.
| |
Icon |
Gets or sets the Icon number. See IconCache for details.
(Inherited from PushPin.) | |
Location |
Gets or sets the location (as a LatLon) of the push pin.
(Inherited from PushPin.) | |
RequiredRendermodes |
Gets the RenderMode required by this PushPin.
(Inherited from PushPin.) |
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.) | |
Render |
Render directional pushpins on the given map, according to their Heading.
(Overrides PushPinRender(Graphics, RenderContext).) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
Tag |
A user object containing data to associate with this PushPin.
(Inherited from PushPin.) |
For best results you should use an icon that is rotatable about its center (that is, the hotspot of the icon is at (width/2, height/2).
Heading values are automatically kept within 360 degrees, but ensuring that the heading results in a visually appropriate rotation is your responsibility.
// load our icon for the pushpin int cacheIndex = ImageUtils.IconCache.LoadIcon("C:\path_to_icon\bus.png"); // location for the pushpin LatLon ll = new LatLon(34.0, -118.0); // heading for the pushpin - we could also get this from a GPS unit, // see Navigation.Navigator.Heading ... float head = 72; // rotated 72 degrees clockwise // create the DirectionalPushPin DirectionalPushPin dpp = new DirectionalPushPin(ll, head, cacheIndex); ... // add to the RendererList so it gets drawn on the map myRendererList.Add(dpp);