Click or drag to resize

Using Multiple Renderers

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Overview

Often many additional objects need to be drawn on a map, which requires a method for having more than just the single renderer described previously.

RendererList

Since the IMap interface's Renderer property only holds a reference to a single IMapRenderer, GeoBase provides the helper class RendererList which holds a list of renderers. The RendererList class itself implements the IMapRenderer interface so the RendererList can be assigned as the renderer for a map. All custom (user) renderers for the map are then added to the RendererList.

The order in which IMapRenderer objects are called by the RendererList will be the same as the order in which they were added. However, the Mode priority of these renderers will affect the order in which they are actually drawn on the map.

Example

Here is an example where several BalloonPushPin renderers are added to a single map. BalloonPushPin is a GeoBase provided renderer that draws a PushPin with a label at a given location.

C#
void SetupRenderers() {
  RendererList rlist = new RendererList();
  rlist.Add( new BalloonPushPin("Telogis HQ", new LatLon(33.63937,-117.94166)) );
  rlist.Add( new BalloonPushPin("Fashion Island", new LatLon(33.61607,-117.87565)) );
  rlist.Add( new BalloonPushPin("John Wayne Airport", new LatLon(33.67441,-117.86951)) );
  mapCtrl.Renderer = rlist;
}