Class: TransferSolutionParameters

SuperMap.TransferSolutionParameters

Traffic transfer solution query parameter class.

new SuperMap.TransferSolutionParameters(options)

TransferSolutionParameters.js, line 5
Name Type Description
options Object

The parameters.

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

There are two query ways: query by the start stop ID and Query by the start and the end stop coordinates.

solutionCount number 6 optional

The solution count.

transferTactic SuperMap.TransferTactic SuperMap.TransferTactic.LESS_TIME optional

The transfer tactic types, including less time, less distance, less transfer, less walking.

transferPreference SuperMap.TransferPreference SuperMap.TransferPreference.NONE optional

The transfer preference enum.

walkingRatio number 10 optional

The cost weight ratio of walk to bus.

evadeLines Array.<number> optional

Evade line ID.

evadeStops Array.<number> optional

Evade stop ID.

priorLines Array.<number> optional

Prior line ID.

priorStops Array.<number> optional

Prior stop ID.

travelTime string optional

The travel time.

Members

evadeLinesnullArray.<number>

Evade line ID.

evadeStopsArray.<number>

Evade stop ID.

Default Value:
TransferLine

pointsArray.<(SuperMap.Geometry.Point|L.Point|L.LatLng|ol.geom.Point|string)>

Two query method:

 1. query by the start ID of the bus stop, the type of points parameter is int[], the format is [start point ID, end point ID], the ID of the bus stop is corresponding to the ID of the service provider configuration;
 2. Query by the coordinate of the start point, the type of the points parameter is Point2D[], in form of [{“x”:44,”y”:39},{“x”:45,”y”:40}].

priorLinesArray.<number>

Prior line ID.

priorStopsArray.<number>

Prior stop ID.

solutionCountnumber

The solution count.

Default Value:
6

transferPreferenceSuperMap.TransferPreference

The transfer preference enum.

Default Value:
SuperMap.TransferPreference.NONE

transferTacticSuperMap.TransferTactic

The transfer tactic types, including less time, less distance, less transfer, less walking. Default is SuperMap.REST.TransferTactic.LESS_TIME.

Default Value:
(TransferTactic|SuperMap.TransferTactic.LESS_TIME)

travelTimestring

Travel time; format:"hour:minute", e.g., "08:30". If you set this parameter, the system will consider the time of the first and the final bus during analysis. In other words, the first and final bus time will be displayed in the result.

walkingRationumber

The ratio of walking to taking bus. The greater the value, the greater the impact of the walking factors on the choice of the scheme.
e.g. There are two solutions:
plan 1. 10km taking bus and 1km walking;
plan 2. 15km taking bus and 0.5km walking.

  1. If the ratio is 15,
    the total cost of solution 1 is 10 + 115 = 25,
    and solution 2 is 15 + 0.5
    15 = 22.5.
    In this case, solution 2 is better.
  2. If the ratio is 2,
    the total cost of solution 1 is 10+12 = 12,
    and solution 2 is 15+0.5
    2 = 17.
    In this case, solution 1 is better.
Default Value:
10

Methods

SuperMap.TransferSolutionParameters.toJsonParameters(params){string}

TransferSolutionParameters.js, line 112

Transform the SuperMap.TransferSolutionParameters to json string.

Name Type Description
params SuperMap.TransferSolutionParameters

The TransferSolutionParameters class.

Returns:
Type Description
string The JSON string..

destroy()

TransferSolutionParameters.js, line 103

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