class QGeoManeuver

The QGeoManeuver class represents the information relevant to the point at which two QGeoRouteSegments meet. More

Synopsis

Properties

  • directionᅟ - The direction associated with the associated instruction

  • distanceToNextInstructionᅟ - The distance, in meters, between the point at which this instruction was issued, and the point at which the next instruction should be issued

  • extendedAttributesᅟ - The extended attributes associated with this maneuver

  • instructionTextᅟ - The textual navigation instructions

  • positionᅟ - The position where instructionText should be displayed

  • timeToNextInstructionᅟ - The estimated time, in seconds, that it will take to travel from the point at which the associated instruction was issued to the point at which the next instruction should be issued

  • validᅟ - Whether this maneuver is valid or not

  • waypointᅟ - The waypoint associated with this maneuver

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

QGeoRouteSegment instances can be thought of as edges on a routing graph, with QGeoManeuver instances as optional labels attached to the vertices of the graph.

The most interesting information help in a QGeoManeuver instance is normally the textual navigation to provide and the position at which to provide it, accessible by instructionText() and position() respectively.

It is also possible to determine if a routing waypoint has been passed by checking if waypoint() returns a valid QGeoCoordinate.

class InstructionDirection

Describes the change in direction associated with the instruction text that is associated with a QGeoManaeuver.

Constant

Description

QGeoManeuver.NoDirection

There is no direction associated with the instruction text.

QGeoManeuver.DirectionForward

The instruction indicates that the direction of travel does not need to change.

QGeoManeuver.DirectionBearRight

The instruction indicates that the direction of travel should bear to the right.

QGeoManeuver.DirectionLightRight

The instruction indicates that a light turn to the right is required.

QGeoManeuver.DirectionRight

The instruction indicates that a turn to the right is required.

QGeoManeuver.DirectionHardRight

The instruction indicates that a hard turn to the right is required.

QGeoManeuver.DirectionUTurnRight

The instruction indicates that a u-turn to the right is required.

QGeoManeuver.DirectionUTurnLeft

The instruction indicates that a u-turn to the left is required.

QGeoManeuver.DirectionHardLeft

The instruction indicates that a hard turn to the left is required.

QGeoManeuver.DirectionLeft

The instruction indicates that a turn to the left is required.

QGeoManeuver.DirectionLightLeft

The instruction indicates that a light turn to the left is required.

QGeoManeuver.DirectionBearLeft

The instruction indicates that the direction of travel should bear to the left.

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property directionᅟ: QGeoManeuver.InstructionDirection

This property holds the direction associated with the associated instruction..

Access functions:
property distanceToNextInstructionᅟ: float

This property holds the distance, in meters, between the point at which this instruction was issued, and the point at which the next instruction should be issued..

Access functions:
property extendedAttributesᅟ: Dictionary with keys of type .QString and values of type QVariant.

This property holds the extended attributes associated with this maneuver..

Access functions:
property instructionTextᅟ: str

This property holds the textual navigation instructions..

Access functions:
property positionᅟ: QGeoCoordinate

This property holds the position where instructionText should be displayed..

Access functions:
property timeToNextInstructionᅟ: int

This property holds the estimated time, in seconds, that it will take to travel from the point at which the associated instruction was issued to the point at which the next instruction should be issued..

Access functions:
property validᅟ: bool

This property holds whether this maneuver is valid or not..

Invalid maneuvers are used when there is no information that needs to be attached to the endpoint of a QGeoRouteSegment instance.

Access functions:
property waypointᅟ: QGeoCoordinate

This property holds the waypoint associated with this maneuver..

If there is not waypoint associated with this maneuver, then this property holds an invalid QGeoCoordinate.

Access functions:
__init__()

Constructs a invalid maneuver object.

The maneuver will remain invalid until one of setPosition(), setInstructionText(), setDirection(), setTimeToNextInstruction(), setDistanceToNextInstruction() or setWaypoint() is called.

__init__(other)
Parameters:

otherQGeoManeuver

Constructs a maneuver object from the contents of other.

direction()
Return type:

InstructionDirection

Getter of property directionᅟ .

distanceToNextInstruction()
Return type:

float

Getter of property distanceToNextInstructionᅟ .

extendedAttributes()
Return type:

Dictionary with keys of type .QString and values of type QVariant.

Getter of property extendedAttributesᅟ .

instructionText()
Return type:

str

Getter of property instructionTextᅟ .

isValid()
Return type:

bool

Getter of property validᅟ .

__ne__(rhs)
Parameters:

rhsQGeoManeuver

Return type:

bool

Returns whether the lhs maneuver is not equal to rhs.

__eq__(rhs)
Parameters:

rhsQGeoManeuver

Return type:

bool

Returns whether the lhs maneuver is equal to rhs.

position()
Return type:

QGeoCoordinate

Getter of property positionᅟ .

setDirection(direction)
Parameters:

directionInstructionDirection

setDistanceToNextInstruction(distance)
Parameters:

distance – float

setExtendedAttributes(extendedAttributes)
Parameters:

extendedAttributes – Dictionary with keys of type .QString and values of type QVariant.

setInstructionText(instructionText)
Parameters:

instructionText – str

setPosition(position)
Parameters:

positionQGeoCoordinate

setTimeToNextInstruction(secs)
Parameters:

secs – int

setWaypoint(coordinate)
Parameters:

coordinateQGeoCoordinate

swap(other)
Parameters:

otherQGeoManeuver

timeToNextInstruction()
Return type:

int

Getter of property timeToNextInstructionᅟ .

waypoint()
Return type:

QGeoCoordinate

Getter of property waypointᅟ .