Class: TemporalRenderer

Description

Class added v2.0.

Temporal renderers provide time-based rendering of features in a feature layer. It can be useful to visualize historic or real-time data such as earthquake or hurricane occurances. You can use a temporal renderer to define how observations (regular, historic, latest) and tracks are rendered. You can also show aging of features with respect to the map's time extent.

Samples

Search for samples that use this class.  

Class hierarchy

esri.renderer.TemporalRenderer

Constructor

Constructor Description
esri.renderer.TemporalRenderer(observationRenderer, latestObservationRenderer?, trackRenderer?, observationAger?) Creates a new TemporalRenderer object that can be used with a time-aware feature layer.

Methods

Method Return Value Description
getSymbol(graphic) Symbol Returns the symbol used to render the graphic.
Constructor Detail

esri.renderer.TemporalRenderer(observationRenderer, latestObservationRenderer?, trackRenderer?, observationAger?)

Creates a new TemporalRenderer object that can be used with a time-aware feature layer.
Parameters:
<Renderer> observationRenderer Required Renderer for regular/historic observations.
<Renderer> latestObservationRenderer Optional Renderer for the most current observations.

In the snippet below RouteID is the field that contains the trackID for the feature layer this is used to display the latest observation for the specified tracks.

var latestObservationRenderer = new esri.renderer.UniqueValueRenderer(defaultSymbol, "RouteID");
latestObservationRenderer.addValue(1,new esri.symbol.PictureMarkerSymbol('images/runnergreen.png',20,20));
latestObservationRenderer.addValue(2,new esri.symbol.PictureMarkerSymbol('images/runnerblue.png',20,20));
latestObservationRenderer.addValue(3,new esri.symbol.PictureMarkerSymbol('images/runnerred.png',20,20));
<Renderer> trackRenderer Optional Renderer for the tracks. A track is a collection of events that share a common track ID. A track line is a graphic line that connects the observations. Applicable only for feature layers with a valid trackIdField.
var trackRenderer = new esri.renderer.SimpleRenderer(myLineSymbol);
<SymbolAger> observationAger Optional

Symbol ager for regular observations.

var infos = [
      {
      minAge: 0,
      maxAge: 1,
      color: new dojo.Color([255, 0, 0])},
      {
      minAge: 1,
      maxAge: 5,
      color: new dojo.Color([255, 153, 0])},
      {
      minAge: 5,
      maxAge: 10,
      color: new dojo.Color([255, 204, 0])},
      {
      minAge: 10,
      maxAge: Infinity,
      color: new dojo.Color([0, 0, 0, 0])}
    ];
var ager = new esri.renderer.TimeClassBreaksAger(infos, esri.renderer.TimeClassBreaksAger.UNIT_MINUTES);
Code snippets:
 var renderer = new esri.renderer.TemporalRenderer(observationRenderer, null, null, ager);
Methods Detail

getSymbol(graphic)

Returns the symbol used to render the graphic.
Return value: Symbol
Input Parameters:
<Graphic> graphic Required The input graphic.