Class: FindPathParameters

SuperMap.FindPathParameters

The FindPathParameters class. Find Optimal path refers to finding the path with the minimum cumulative impedance by visiting all the specified nodes in order. For example, to find a path for visiting Point 1, Point 2, Point 3, and Point 4 in order with the minimum cumulative impedance, the paths with the least impedance between Point 1 and Point 2, Point 2 and Point 3, Point 3 and Point 4 have to be determined respectively. Impedance in path analysis may refer to any thing such as travel time, distance, financial cost, toll stations, etc. The minimum impedance may refer to the shortest distance, least time or least cost between two points. Finding the path with the shortest distance is the most simple path analysis. Impedance is set by TransportationAnalystParameter.weightFieldName. The best calculation path is also affected by the turn field in addition to impedance. Impedance is set by SuperMap.TransportationAnalystParameter.turnWeightField.

new SuperMap.FindPathParameters(options)

FindPathParameters.js, line 5
Name Type Description
options Object

The parameters.

Name Type Default Description
nodes Array.<(SuperMap.Geometry.Point|L.LatLng|L.Point|ol.geom.Point|number)>

The node or the facility point array passed by the optimal path analysis. This field contains at least two points.

isAnalyzeById boolean false optional

Whether to specify nodes for path analysis through the ID numbers.

hasLeastEdgeCount boolean false optional

Whether to carry out the optimal path analysis according to the least number of arcs.

parameter SuperMap.TransportationAnalystParameter optional

The general parameters for transportation network analyses.

Members

hasLeastEdgeCountboolean

Whether to carry out the optimal path analysis according to the least number of arcs. True means analyzing according to the least number of arcs, and returns the best path that has the minimum impedance in the least number of arcs; False means directly returning the path of the minimum impedance, regardless of the number of arcs.

isAnalyzeByIdboolean

Whether to specify nodes for path analysis through the ID numbers. The default value is false. The node or the facility point passed by the specified path analysis has two ways: entering the node ID number or directly entering the point coordinate. When this field is true, means that passing the node ID specified path point, which is FindPathParameters.nodes = [ID1,ID2,...]; otherwise, means that passing the node coordinate specified path point, which is FindPathParameters.nodes = [new SuperMap.Geometry.Point(x1,y1),new SuperMap.Geometry.Point(x2,y2),...].

nodesArray.<(SuperMap.Geometry.Point|L.LatLng|L.Point|ol.geom.Point|number)>

The node or the facility point array passed by the optimal path analysis. This field contains at least two points. When FindPathParameters.isAnalyzeById = false, nodes should be the coordinate array of the point; When FindPathParameters.isAnalyzeById = true, nodes should be the ID array of the point.

The general parameters for transportation network analyses.

Methods

destroy()

FindPathParameters.js, line 61

Disposes the resource. The property that references resource is set to null.