TrafficRenderer Class |
Namespace: Telogis.GeoBase.Traffic
The TrafficRenderer type exposes the following members.
Name | Description | |
---|---|---|
TrafficRenderer(Traffic, DateTime) |
Render the given Traffic on a map object. The given
time is used to determine the traffic congestion.
| |
TrafficRenderer(Traffic, DateTime, MapStyle) |
Render the given Traffic on a map object. The given
time is used to determine the traffic congestion.
| |
TrafficRenderer(Traffic, DateTime, MapStyle, MapStyle) |
Render the given Traffic on a map object. The given
time is used to determine the traffic congestion.
|
Name | Description | |
---|---|---|
CurrentTime |
The time in UTC to render the traffic for.
| |
DefaultStyle |
Returns the default map style used for displaying traffic flow.
| |
RequiredRendermodes |
Gets the RenderMode required by this TrafficRenderer.
| |
TrafficBase |
The Traffic used in this TrafficRenderer.
|
Name | Description | |
---|---|---|
Dispose | Releases all resources used by the TrafficRenderer | |
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 |
Implementation of IMapRenderer used
to draw the traffic. Should not be called directly. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Related articles: Routing with Traffic, Traffic.
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));