Packagecom.esri.ags.tasks
Classpublic class DirectionsFeatureSet
InheritanceDirectionsFeatureSet Inheritance FeatureSet Inheritance flash.events.EventDispatcher

A FeatureSet that has properties specific to routing. The features property contains the turn-by-turn directions text and geometry of the route.

Note: DirectionsFeatureSet, and other routing related classes, were added in version 1.2 and requires ArcGIS Server 9.3.1 or above (with a "route" layer).


Example
ActionScript to use DirectionsFeatureSet:
 var routeResult:RouteResult = event.routeSolveResult.routeResults[0];
 directionsFS = routeResult.directions;
  graphicsLayer.add(new Graphic(directionsFS.mergedGeometry, routeSymbol));
  var i:int = 0;
 for each (var feature:Graphic in directionsFS.features)
 {
    directions.htmlText += "
"+ feature.attributes.text + " (" + feature.attributes.length + " miles)"); i++; }

See also

RouteResult
Live Sample - Routing with driving directions.


Public Properties
 PropertyDefined by
 Inheritedattributes : Array
Array of Objects where each object holds the name-value pairs of field names and field values.
FeatureSet
 InheriteddisplayFieldName : String
The display field name.
FeatureSet
  extent : Extent
The extent of the route.
DirectionsFeatureSet
 Inheritedfeatures : Array
Array of graphic features.
FeatureSet
 InheritedfieldAliases : Object
The field aliases.
FeatureSet
 InheritedgeometryType : String
The geometry type of the feature.
FeatureSet
  mergedGeometry : Polyline
A single polyline representing the route.
DirectionsFeatureSet
  routeId : String
The ID of the route returned from the server.
DirectionsFeatureSet
  routeName : String
Name specified in RouteParameters.stops.
DirectionsFeatureSet
 InheritedspatialReference : SpatialReference
The spatial reference of the features.
FeatureSet
  totalDriveTime : Number
Actual drive time calculated for the route.
DirectionsFeatureSet
  totalLength : Number
The length of the route as specified in RouteParameters.directionsLengthUnits.
DirectionsFeatureSet
  totalTime : Number
The total time calculated for the route as specified in RouteParameters.directionsTimeAttribute.
DirectionsFeatureSet
Public Methods
 MethodDefined by
 Inherited
[static] Convert from JSON to FeatureSet [added in version 1.3].
FeatureSet
 Inherited
convertToJSON():String
Convert this FeatureSet to a JSON formatted String [added in version 1.3].
FeatureSet
Property detail
extentproperty
public var extent:Extent

The extent of the route.

This property can be used as the source for data binding.

mergedGeometryproperty 
public var mergedGeometry:Polyline

A single polyline representing the route.

This property can be used as the source for data binding.

routeIdproperty 
public var routeId:String

The ID of the route returned from the server.

This property can be used as the source for data binding.

routeNameproperty 
public var routeName:String

Name specified in RouteParameters.stops.

This property can be used as the source for data binding.

See also

totalDriveTimeproperty 
public var totalDriveTime:Number

Actual drive time calculated for the route.

This property can be used as the source for data binding.

totalLengthproperty 
public var totalLength:Number

The length of the route as specified in RouteParameters.directionsLengthUnits.

This property can be used as the source for data binding.

See also

totalTimeproperty 
public var totalTime:Number

The total time calculated for the route as specified in RouteParameters.directionsTimeAttribute.

This property can be used as the source for data binding.

See also