QGeoRoute¶
Synopsis¶
Functions¶
def
__eq__
(other)def
__ne__
(other)def
bounds
()def
distance
()def
extendedAttributes
()def
firstRouteSegment
()def
path
()def
request
()def
routeId
()def
setBounds
(bounds)def
setDistance
(distance)def
setExtendedAttributes
(extendedAttributes)def
setFirstRouteSegment
(routeSegment)def
setPath
(path)def
setRequest
(request)def
setRouteId
(id)def
setTravelMode
(mode)def
setTravelTime
(secs)def
travelMode
()def
travelTime
()
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 ofQGeoRouteSegment
objecs which describe subsections of the route in greater detail.Routing information is normally requested using
calculateRoute()
, which returns aQGeoRouteReply
instance. If the operation is completed successfully the routing information can be accessed withroutes()
See also
- class PySide2.QtLocation.QGeoRoute¶
PySide2.QtLocation.QGeoRoute(other)
- param other:
Constructs a route object.
- PySide2.QtLocation.QGeoRoute.bounds()¶
- Return type:
Returns a bounding box which encompasses the entire route.
See also
- PySide2.QtLocation.QGeoRoute.distance()¶
- Return type:
float
Returns the distance covered by this route, in meters.
See also
- PySide2.QtLocation.QGeoRoute.extendedAttributes()¶
- Return type:
Returns the extended attributes associated with this route.
See also
- PySide2.QtLocation.QGeoRoute.firstRouteSegment()¶
- Return type:
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
.See also
- PySide2.QtLocation.QGeoRoute.__ne__(other)¶
- Parameters:
other –
PySide2.QtLocation.QGeoRoute
- Return type:
bool
Returns whether this route and
other
are not equal.
- PySide2.QtLocation.QGeoRoute.__eq__(other)¶
- Parameters:
other –
PySide2.QtLocation.QGeoRoute
- 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
- PySide2.QtLocation.QGeoRoute.request()¶
- Return type:
Returns the route request which describes the criteria used in the calculation of this route.
See also
- PySide2.QtLocation.QGeoRoute.routeId()¶
- Return type:
str
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
- PySide2.QtLocation.QGeoRoute.setBounds(bounds)¶
- Parameters:
bounds –
PySide2.QtPositioning.QGeoRectangle
Sets the bounding box which encompasses the entire route to
bounds
.See also
- PySide2.QtLocation.QGeoRoute.setDistance(distance)¶
- Parameters:
distance – float
Sets the distance covered by this route, in meters, to
distance
.See also
- PySide2.QtLocation.QGeoRoute.setExtendedAttributes(extendedAttributes)¶
- Parameters:
extendedAttributes –
Sets the extended attributes
extendedAttributes
associated with this route.See also
- PySide2.QtLocation.QGeoRoute.setFirstRouteSegment(routeSegment)¶
- Parameters:
routeSegment –
PySide2.QtLocation.QGeoRouteSegment
Sets the first route segment in the route to
routeSegment
.See also
- 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
- PySide2.QtLocation.QGeoRoute.setRequest(request)¶
- Parameters:
request –
PySide2.QtLocation.QGeoRouteRequest
Sets the route request which describes the criteria used in the calculcation of this route to
request
.See also
- PySide2.QtLocation.QGeoRoute.setRouteId(id)¶
- Parameters:
id – str
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
- PySide2.QtLocation.QGeoRoute.setTravelMode(mode)¶
- Parameters:
mode –
TravelMode
Sets the travel mode for this route to
mode
.This should be one of the travel modes returned by
request()
.travelModes().See also
- PySide2.QtLocation.QGeoRoute.setTravelTime(secs)¶
- Parameters:
secs – int
Sets the estimated amount of time it will take to traverse this route, in seconds, to
secs
.See also
- PySide2.QtLocation.QGeoRoute.travelMode()¶
- Return type:
Returns the travel mode for the this route.
This should be one of the travel modes returned by
request()
.travelModes().See also
- PySide2.QtLocation.QGeoRoute.travelTime()¶
- Return type:
int
Returns the estimated amount of time it will take to traverse this route, in seconds.
See also
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.