QGeoManeuver

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

Inheritance diagram of PySide2.QtLocation.QGeoManeuver

Synopsis

Functions

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 QGeoManeuver

QGeoManeuver(other)

param other

QGeoManeuver

Constructs a invalid maneuver object.

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

PySide2.QtLocation.QGeoManeuver.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.

PySide2.QtLocation.QGeoManeuver.direction()
Return type

InstructionDirection

Returns the direction associated with the associated instruction.

See also

setDirection()

PySide2.QtLocation.QGeoManeuver.distanceToNextInstruction()
Return type

qreal

Returns the distance, in meters, between the point at which the associated instruction was issued and the point that the next instruction should be issued.

PySide2.QtLocation.QGeoManeuver.extendedAttributes()
Return type

QVariantMap

Returns the extended attributes associated with this maneuver.

PySide2.QtLocation.QGeoManeuver.instructionText()
Return type

unicode

Returns the textual navigation instructions.

PySide2.QtLocation.QGeoManeuver.isValid()
Return type

bool

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

PySide2.QtLocation.QGeoManeuver.__ne__(other)
Parameters

otherQGeoManeuver

Return type

bool

Returns whether this maneuver is not equal to other .

PySide2.QtLocation.QGeoManeuver.__eq__(other)
Parameters

otherQGeoManeuver

Return type

bool

Returns whether this maneuver is equal to other .

PySide2.QtLocation.QGeoManeuver.position()
Return type

QGeoCoordinate

Returns the position where instructionText() should be displayed.

See also

setPosition()

PySide2.QtLocation.QGeoManeuver.setDirection(direction)
Parameters

directionInstructionDirection

Sets the direction associated with the associated instruction to direction .

See also

direction()

PySide2.QtLocation.QGeoManeuver.setDistanceToNextInstruction(distance)
Parameters

distanceqreal

Sets the distance, in meters, between the point at which the associated instruction was issued and the point that the next instruction should be issued to distance .

PySide2.QtLocation.QGeoManeuver.setExtendedAttributes(extendedAttributes)
Parameters

extendedAttributesQVariantMap

Sets the extended attributes extendedAttributes associated with this maneuver.

PySide2.QtLocation.QGeoManeuver.setInstructionText(instructionText)
Parameters

instructionText – unicode

Sets the textual navigation instructions to instructionText .

PySide2.QtLocation.QGeoManeuver.setPosition(position)
Parameters

positionQGeoCoordinate

Sets the position where instructionText() should be displayed to position .

See also

position()

PySide2.QtLocation.QGeoManeuver.setTimeToNextInstruction(secs)
Parameters

secsint

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

PySide2.QtLocation.QGeoManeuver.setWaypoint(coordinate)
Parameters

coordinateQGeoCoordinate

Sets the waypoint associated with this maneuver to coordinate .

See also

waypoint()

PySide2.QtLocation.QGeoManeuver.timeToNextInstruction()
Return type

int

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

PySide2.QtLocation.QGeoManeuver.waypoint()
Return type

QGeoCoordinate

Returns the waypoint associated with this maneuver.

If there is not waypoint associated with this maneuver an invalid QGeoCoordinate will be returned.

See also

setWaypoint()