Skip to main content

DirectionsQuery

Résumé

Provides access to directions properties and query methods.

Discussion

A DirectionsQuery object is provided as a parameter to the customize method, allowing access to the output directions traversed junctions and traversed edges. The direction points associated with these elements can be accessed allowing them to be customized.

Propriétés

Nom Explication Type de données

edges

(Lecture seule)

The edges in the sequence being traversed.

TraversedJunction

junctions

(Lecture seule)

The junctions in the sequence being traversed.

TraversedJunction

routeID

(Lecture seule)

The ID of the route in the result (zero based).

Integer

routeName

(Lecture seule)

The name of the route

String

softRestrictionNames

(Lecture seule)

An iterable of enabled soft restrictions.

Iterable

Méthodes

adjacentEdges(junction)

Returns the adjacent edges of the specified junction. These edges are not traversed.

Nom Explication Type de données

junction

The adjacent edge from the specified junction.

TraversedJunction

Valeur de retour

Type de données Explication

AdjacentNetworkEdge

An iterable of adjacent edges.

attributeValue(element, attribute)

Returns the value of the specified network attribute for the element.

Nom Explication Type de données

element

The element that will be queried for the attribute value.

TraversedElement

attribute

The attribute that the value will be applied to.

Attribute

Valeur de retour

Type de données Explication

Object

The attribute value or None if the attribute doesn't exist. This could also be an integer, a float, or a boolean.

fieldValue(element, mapped_field_name)

Returns the value of the specified mapped field for the specified element.

Nom Explication Type de données

element

A TraversedEdge, TraversedJunction, or TraversedTurn object.

TraversedElement

mapped_field_name

The mapped field name.

String

Valeur de retour

Type de données Explication

Object

The field value or None if the field doesn't exist or is not mapped. This could also be an integer, a float, or a string.

fromEdge(turn)

Returns the from edge of the specified turn.

Nom Explication Type de données

turn

The from edge of the specified turn.

TraversedTurn

Valeur de retour

Type de données Explication

TraversedEdge

A traversed edge.

fromJunction(edge)

Returns the from junction for the specified edge.

Nom Explication Type de données

edge

The edge that will get the from junction.

TraversedEdge

Valeur de retour

Type de données Explication

TraversedJunction

A traversed junction.

nextTraversedEdge(junction)

Returns the next edge of the specified junction.

Nom Explication Type de données

junction

The next traversed edge from the specified junction.

TraversedJunction

Valeur de retour

Type de données Explication

TraversedEdge

A traversed edge, or None is also a possible return value.

previousTraversedEdge(junction)

Returns the previous edge of the specified junction.

Nom Explication Type de données

junction

The previous traversed edge from the specified junction

TraversedJunction

Valeur de retour

Type de données Explication

TraversedEdge

A traversed edge, or None is also a possible return value.

toEdge(turn)

Returns the to edge of the specified turn.

Nom Explication Type de données

turn

The to edge of the specified turn.

TraversedTurn

Valeur de retour

Type de données Explication

TraversedEdge

A traversed edge.

toJunction(edge)

Returns the to junction for the specified edge.

Nom Explication Type de données

edge

The edge that will get the to junction.

TraversedEdge

Valeur de retour

Type de données Explication

TraversedJunction

A traversed junction.

turns(junction)

Returns the turns of the specified junction.

Nom Explication Type de données

junction

The turns of the specified junction.

TraversedJunction

Valeur de retour

Type de données Explication

TraversedTurn

An iterable of traversed turns.