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.99.0.0
Syntax
[SerializableAttribute]
public class RendererList : ArrayList, 
	IMapRenderer, IMapMouseHandler

The RendererList type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyCapacity
Gets or sets the number of elements that the ArrayList can contain.
(Inherited from ArrayList.)
Public propertyCount
Gets the number of elements actually contained in the ArrayList.
(Inherited from ArrayList.)
Public propertyIsFixedSize
Gets a value indicating whether the ArrayList has a fixed size.
(Inherited from ArrayList.)
Public propertyIsReadOnly
Gets a value indicating whether the ArrayList is read-only.
(Inherited from ArrayList.)
Public propertyIsSynchronized
Gets a value indicating whether access to the ArrayList is synchronized (thread safe).
(Inherited from ArrayList.)
Public propertyItem
Gets or sets the element at the specified index.
(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
Gets an object that can be used to synchronize access to the ArrayList.
(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
Adds the elements of an ICollection to the end of the ArrayList.
(Inherited from ArrayList.)
Public methodBinarySearch(Object)
Searches the entire sorted ArrayList for an element using the default comparer and returns the zero-based index of the element.
(Inherited from ArrayList.)
Public methodBinarySearch(Object, IComparer)
Searches the entire sorted ArrayList for an element using the specified comparer and returns the zero-based index of the element.
(Inherited from ArrayList.)
Public methodBinarySearch(Int32, Int32, Object, IComparer)
Searches a range of elements in the sorted ArrayList for an element using the specified comparer and returns the zero-based index of the element.
(Inherited from ArrayList.)
Public methodClear
Removes all elements from the ArrayList.
(Inherited from ArrayList.)
Public methodClone
Creates a shallow copy of the ArrayList.
(Inherited from ArrayList.)
Public methodContains
Determines whether an element is in the ArrayList.
(Inherited from ArrayList.)
Public methodCopyTo(Array)
Copies the entire ArrayList to a compatible one-dimensional Array, starting at the beginning of the target array.
(Inherited from ArrayList.)
Public methodCopyTo(Array, Int32)
Copies the entire ArrayList to a compatible one-dimensional Array, starting at the specified index of the target array.
(Inherited from ArrayList.)
Public methodCopyTo(Int32, Array, Int32, Int32)
Copies a range of elements from the ArrayList to a compatible one-dimensional Array, starting at the specified index of the target array.
(Inherited from ArrayList.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator for the entire ArrayList.
(Inherited from ArrayList.)
Public methodGetEnumerator(Int32, Int32)
Returns an enumerator for a range of elements in the ArrayList.
(Inherited from ArrayList.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetRange
Returns an ArrayList which represents a subset of the elements in the source ArrayList.
(Inherited from ArrayList.)
Public methodGetType
Gets the Type of the current instance.
(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)
Searches for the specified Object and returns the zero-based index of the first occurrence within the entire ArrayList.
(Inherited from ArrayList.)
Public methodIndexOf(Object, Int32)
Searches for the specified Object and returns the zero-based index of the first occurrence within the range of elements in the ArrayList that extends from the specified index to the last element.
(Inherited from ArrayList.)
Public methodIndexOf(Object, Int32, Int32)
Searches for the specified Object and returns the zero-based index of the first occurrence within the range of elements in the ArrayList that starts at the specified index and contains the specified number of elements.
(Inherited from ArrayList.)
Public methodInsert
Inserts an element into the ArrayList at the specified index.
(Inherited from ArrayList.)
Public methodInsertRange
Inserts the elements of a collection into the ArrayList at the specified index.
(Inherited from ArrayList.)
Public methodLastIndexOf(Object)
Searches for the specified Object and returns the zero-based index of the last occurrence within the entire ArrayList.
(Inherited from ArrayList.)
Public methodLastIndexOf(Object, Int32)
Searches for the specified Object and returns the zero-based index of the last occurrence within the range of elements in the ArrayList that extends from the first element to the specified index.
(Inherited from ArrayList.)
Public methodLastIndexOf(Object, Int32, Int32)
Searches for the specified Object and returns the zero-based index of the last occurrence within the range of elements in the ArrayList that contains the specified number of elements and ends at the specified index.
(Inherited from ArrayList.)
Public methodRemove
Removes an IMapRenderer from the RendererList.
(Overrides ArrayListRemove(Object).)
Public methodRemoveAt
Removes the element at the specified index of the ArrayList.
(Inherited from ArrayList.)
Public methodRemoveRange
Removes a range of elements from the ArrayList.
(Inherited from ArrayList.)
Public methodRender
Render all IMapRenderers on the given IMap.
Public methodReverse
Reverses the order of the elements in the entire ArrayList.
(Inherited from ArrayList.)
Public methodReverse(Int32, Int32)
Reverses the order of the elements in the specified range.
(Inherited from ArrayList.)
Public methodSetRange
Copies the elements of a collection over a range of elements in the ArrayList.
(Inherited from ArrayList.)
Public methodSort
Sorts the elements in the entire ArrayList.
(Inherited from ArrayList.)
Public methodSort(IComparer)
Sorts the elements in the entire ArrayList using the specified comparer.
(Inherited from ArrayList.)
Public methodSort(Int32, Int32, IComparer)
Sorts the elements in a range of elements in ArrayList using the specified comparer.
(Inherited from ArrayList.)
Public methodToArray
Copies the elements of the ArrayList to a new Object array.
(Inherited from ArrayList.)
Public methodToArray(Type)
Copies the elements of the ArrayList to a new array of the specified element type.
(Inherited from ArrayList.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTrimToSize
Sets the capacity to the actual number of elements in the ArrayList.
(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