QGeoRoute

The QGeoRoute class represents a route between two points. More

Inheritance diagram of PySide2.QtLocation.QGeoRoute

Synopsis

Functions

Detailed Description

A QGeoRoute object contains high level information about a route, such as the length the route, the estimated travel time for the route, and enough information to render a basic image of the route on a map.

The QGeoRoute object also contains a list of QGeoRouteSegment objecs which describe subsections of the route in greater detail.

Routing information is normally requested using calculateRoute() , which returns a QGeoRouteReply instance. If the operation is completed successfully the routing information can be accessed with routes()

See also

QGeoRoutingManager

class QGeoRoute

QGeoRoute(other)

param other

QGeoRoute

Constructs a route object.

PySide2.QtLocation.QGeoRoute.bounds()
Return type

QGeoRectangle

Returns a bounding box which encompasses the entire route.

See also

setBounds()

PySide2.QtLocation.QGeoRoute.distance()
Return type

qreal

Returns the distance covered by this route, in meters.

See also

setDistance()

PySide2.QtLocation.QGeoRoute.firstRouteSegment()
Return type

QGeoRouteSegment

Returns the first route segment in the route.

Will return an invalid route segment if there are no route segments associated with the route.

The remaining route segments can be accessed sequentially with nextRouteSegment .

PySide2.QtLocation.QGeoRoute.__ne__(other)
Parameters

otherQGeoRoute

Return type

bool

Returns whether this route and other are not equal.

PySide2.QtLocation.QGeoRoute.__eq__(other)
Parameters

otherQGeoRoute

Return type

bool

Returns whether this route and other are equal.

PySide2.QtLocation.QGeoRoute.path()
Return type

Returns the geometric shape of the route.

The coordinates should be listed in the order in which they would be traversed by someone traveling along this segment of the route.

See also

setPath()

PySide2.QtLocation.QGeoRoute.request()
Return type

QGeoRouteRequest

Returns the route request which describes the criteria used in the calculation of this route.

See also

setRequest()

PySide2.QtLocation.QGeoRoute.routeId()
Return type

unicode

Returns the identifier of this route.

Service providers which support the updating of routes commonly assign identifiers to routes. If this route did not come from such a service provider the function will return an empty string.

See also

setRouteId()

PySide2.QtLocation.QGeoRoute.setBounds(bounds)
Parameters

boundsQGeoRectangle

Sets the bounding box which encompasses the entire route to bounds .

See also

bounds()

PySide2.QtLocation.QGeoRoute.setDistance(distance)
Parameters

distanceqreal

Sets the distance covered by this route, in meters, to distance .

See also

distance()

PySide2.QtLocation.QGeoRoute.setFirstRouteSegment(routeSegment)
Parameters

routeSegmentQGeoRouteSegment

Sets the first route segment in the route to routeSegment .

PySide2.QtLocation.QGeoRoute.setPath(path)
Parameters

path

Sets the geometric shape of the route to path .

The coordinates in path should be listed in the order in which they would be traversed by someone traveling along this segment of the route.

See also

path()

PySide2.QtLocation.QGeoRoute.setRequest(request)
Parameters

requestQGeoRouteRequest

Sets the route request which describes the criteria used in the calculcation of this route to request .

See also

request()

PySide2.QtLocation.QGeoRoute.setRouteId(id)
Parameters

id – unicode

Sets the identifier of this route to id .

Service providers which support the updating of routes commonly assign identifiers to routes. If this route came from such a service provider changing the identifier will probably cause route updates to stop working.

See also

routeId()

PySide2.QtLocation.QGeoRoute.setTravelMode(mode)
Parameters

modeTravelMode

Sets the travel mode for this route to mode .

This should be one of the travel modes returned by request() .travelModes().

See also

travelMode()

PySide2.QtLocation.QGeoRoute.setTravelTime(secs)
Parameters

secsint

Sets the estimated amount of time it will take to traverse this route, in seconds, to secs .

See also

travelTime()

PySide2.QtLocation.QGeoRoute.travelMode()
Return type

TravelMode

Returns the travel mode for the this route.

This should be one of the travel modes returned by request() .travelModes().

See also

setTravelMode()

PySide2.QtLocation.QGeoRoute.travelTime()
Return type

int

Returns the estimated amount of time it will take to traverse this route, in seconds.

See also

setTravelTime()