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

A FeatureSet that has properties specific to network analyst operations like routing and closest facility. The features property contains the turn-by-turn directions text and geometry of the route.

Default MXML Propertyfeatures

View the examples

See also

ClosestFacilitySolveResult
RouteResult
Live Sample - Routing with driving directions.


Public Properties
 PropertyDefined By
 Inheritedattributes : Array
[read-only] 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
 Inheritedfields : Array
The fields.
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
Deprecated Since ArcGIS API for Flex 2.4: Please Use fromJSON()
[static] Convert from JSON to FeatureSet.
FeatureSet
 Inherited
convertToJSON():String
Deprecated Since ArcGIS API for Flex 2.4: Please Use toJSON()
Convert this FeatureSet to a JSON formatted String.
FeatureSet
 Inherited
fromJSON(json:String):FeatureSet
[static] Convert from JSON to FeatureSet.
FeatureSet
 Inherited
toJSON():String
Convert this FeatureSet to a JSON formatted String.
FeatureSet
Property Detail
extentproperty
extent:Extent

The extent of the route.

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


Implementation
    public function get extent():Extent
    public function set extent(value:Extent):void
mergedGeometryproperty 
mergedGeometry:Polyline

A single polyline representing the route.

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


Implementation
    public function get mergedGeometry():Polyline
    public function set mergedGeometry(value:Polyline):void
routeIdproperty 
routeId:String

The ID of the route returned from the server.

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


Implementation
    public function get routeId():String
    public function set routeId(value:String):void
routeNameproperty 
routeName:String

Name specified in RouteParameters.stops.

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


Implementation
    public function get routeName():String
    public function set routeName(value:String):void

See also

totalDriveTimeproperty 
totalDriveTime:Number

Actual drive time calculated for the route.

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


Implementation
    public function get totalDriveTime():Number
    public function set totalDriveTime(value:Number):void
totalLengthproperty 
totalLength:Number

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

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


Implementation
    public function get totalLength():Number
    public function set totalLength(value:Number):void

See also

totalTimeproperty 
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.


Implementation
    public function get totalTime():Number
    public function set totalTime(value:Number):void

See also

Examples
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 += "<br/>" + feature.attributes.text
        + " (" + feature.attributes.length + " miles)");
    i++;
 }