Click or drag to resize

RendererList Class

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
A Collection of Renderers which allows multiple IMapRenderers to draw on the same IMap.
Inheritance Hierarchy

Namespace:  Telogis.GeoBase
Assembly:  geobase.net (in geobase.net.dll) Version: 4.84.0.0
Syntax
[SerializableAttribute]
public class RendererList : ArrayList, 
	IMapRenderer, IMapMouseHandler

The RendererList type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyCapacity (Inherited from ArrayList.)
Public propertyCount (Inherited from ArrayList.)
Public propertyIsFixedSize (Inherited from ArrayList.)
Public propertyIsReadOnly (Inherited from ArrayList.)
Public propertyIsSynchronized (Inherited from ArrayList.)
Public propertyItem (Inherited from ArrayList.)
Public propertyMapMouseEventsHandler
Gets the events object for the list, always returns null.
Public propertyRequiredRendermodes
Gets the rendermode in which this RendererList is drawn.
Public propertySyncRoot (Inherited from ArrayList.)
Public propertyVisible
Sets whether the items in this RendererList should be drawn.
Top
Methods
  NameDescription
Public methodAdd
Adds an IMapRenderer to the end of the RendererList.
(Overrides ArrayListAdd(Object).)
Public methodAddRange (Inherited from ArrayList.)
Public methodBinarySearch(Object) (Inherited from ArrayList.)
Public methodBinarySearch(Object, IComparer) (Inherited from ArrayList.)
Public methodBinarySearch(Int32, Int32, Object, IComparer) (Inherited from ArrayList.)
Public methodClear (Inherited from ArrayList.)
Public methodClone (Inherited from ArrayList.)
Public methodContains (Inherited from ArrayList.)
Public methodCopyTo(Array) (Inherited from ArrayList.)
Public methodCopyTo(Array, Int32) (Inherited from ArrayList.)
Public methodCopyTo(Int32, Array, Int32, Int32) (Inherited from ArrayList.)
Public methodEquals (Inherited from Object.)
Public methodGetEnumerator (Inherited from ArrayList.)
Public methodGetEnumerator(Int32, Int32) (Inherited from ArrayList.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetRange (Inherited from ArrayList.)
Public methodGetType (Inherited from Object.)
Public methodHitTest
If this RendererList is Visible, check if any of the objects in the list are located at the specified x and y coordinates.
Public methodIndexOf(Object) (Inherited from ArrayList.)
Public methodIndexOf(Object, Int32) (Inherited from ArrayList.)
Public methodIndexOf(Object, Int32, Int32) (Inherited from ArrayList.)
Public methodInsert (Inherited from ArrayList.)
Public methodInsertRange (Inherited from ArrayList.)
Public methodLastIndexOf(Object) (Inherited from ArrayList.)
Public methodLastIndexOf(Object, Int32) (Inherited from ArrayList.)
Public methodLastIndexOf(Object, Int32, Int32) (Inherited from ArrayList.)
Public methodRemove
Removes an IMapRenderer from the RendererList.
(Overrides ArrayListRemove(Object).)
Public methodRemoveAt (Inherited from ArrayList.)
Public methodRemoveRange (Inherited from ArrayList.)
Public methodRender
Render all IMapRenderers on the given IMap.
Public methodReverse (Inherited from ArrayList.)
Public methodReverse(Int32, Int32) (Inherited from ArrayList.)
Public methodSetRange (Inherited from ArrayList.)
Public methodSort (Inherited from ArrayList.)
Public methodSort(IComparer) (Inherited from ArrayList.)
Public methodSort(Int32, Int32, IComparer) (Inherited from ArrayList.)
Public methodToArray (Inherited from ArrayList.)
Public methodToArray(Type) (Inherited from ArrayList.)
Public methodToString (Inherited from Object.)
Public methodTrimToSize (Inherited from ArrayList.)
Top
Remarks
An IMap can only have one IMapRenderer assigned to it at a time. To allow multiple IMapRenderers to draw on a single map, a RendererList should be used.

Each IMapRenderer added to the RendererList will have its Render(Graphics, RenderContext) method called. These will be called in the order that the IMapRenderers were added to the RendererList. IMapRenderers can be added to the RendererList using the Add(Object) method.

Related articles: Map Concept, Routing Concept, Using Notifications and Events, Renderers Tutorial, Using Multiple Renderers, Render Modes in Detail.

Examples
The most common use for a RendererList is to control the rendering of multiple objects on a MapCtrl:
C#
RendererList rlist = new RendererList();
myMapCtrl.Renderer = rlist;
We can create objects (which implement IMapRenderer) and add/remove the objects from our RendererList as desired.
C#
// pushpin in Los Angeles
PushPin pp = new PushPin(new LatLon(34, -118)); 

// Circular geofence in San Diego
CircleFence cfence = new CircleFence();
cfence.SetRadius(50, DistanceUnit.MILES);
cfence.Center = new LatLon(33,-117);

rlist.Add(cfence);
rlist.Add(pp);
myMapCtrl.Invalidate();
// ...both the CircleFence and PushPin will be drawn on the map

...

rlist.Remove(cfence);
myMapCtrl.Invalidate();
// ...now only the PushPin will be drawn on the map
By invalidating the MapCtrl we ensure that the map will be redrawn to reflect the changes we have made to it's RendererList.
See Also