Click or drag to resize

TrafficRenderer Class

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
A TrafficRenderer may be used to render a specified Traffic unit on a map.
Inheritance Hierarchy
SystemObject
  Telogis.GeoBase.TrafficTrafficRenderer

Namespace:  Telogis.GeoBase.Traffic
Assembly:  geobase.net (in geobase.net.dll) Version: 4.84.0.0
Syntax
public class TrafficRenderer : IMapRenderer, 
	IDisposable

The TrafficRenderer type exposes the following members.

Constructors
  NameDescription
Public methodTrafficRenderer(Traffic, DateTime)
Render the given Traffic on a map object. The given time is used to determine the traffic congestion.
Public methodTrafficRenderer(Traffic, DateTime, MapStyle)
Render the given Traffic on a map object. The given time is used to determine the traffic congestion.
Public methodTrafficRenderer(Traffic, DateTime, MapStyle, MapStyle)
Render the given Traffic on a map object. The given time is used to determine the traffic congestion.
Top
Properties
  NameDescription
Public propertyCurrentTime
The time in UTC to render the traffic for.
Public propertyStatic memberDefaultStyle
Returns the default map style used for displaying traffic flow.
Public propertyRequiredRendermodes
Gets the RenderMode required by this TrafficRenderer.
Public propertyTrafficBase
The Traffic used in this TrafficRenderer.
Top
Methods
  NameDescription
Public methodDispose
Releases all resources used by the TrafficRenderer
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodRender
Implementation of IMapRenderer used to draw the traffic. Should not be called directly.
Public methodToString (Inherited from Object.)
Top
Remarks
The TrafficRenderer implements the IMapRenderer.

Related articles: Routing with Traffic, Traffic.

Examples
C#
RendererList trafficRendererList = new RendererList();

//Set file path to traffic data
string dataFile = @"C:\data\NavteqHistoricalTraffic.gbhb";

//Create collection of traffic sources - just one in this case
ITrafficSource[] srcs = new ITrafficSource[] { new HistoricalTrafficSource(dataFile) };

//Create traffic using the collection of traffic sources
Traffic myTraffic = new Traffic(srcs);

//Set the time, making sure that you convert to UTC first
DateTime routingTime = DateTime.UtcNow;

//Get the latest data
myTraffic = trafficFetcher.GetLatestTraffic(routingTime);
trafficRendererList.Add(new TrafficRenderer(myTraffic, routingTime));
See Also