内容表

上一话题

QGeoManeuver

下一话题

QGeoRouteReply

QGeoRoute

QGeoRoute class represents a route between two points. 更多

Inheritance diagram of PySide2.QtLocation.QGeoRoute

概要

函数

详细描述

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.

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()

另请参阅

QGeoRoutingManager

class QGeoRoute

QGeoRoute(other)

param other

QGeoRoute

Constructs a route object.

PySide2.QtLocation.QGeoRoute. bounds ( )
返回类型

QGeoRectangle

Returns a bounding box which encompasses the entire route.

另请参阅

setBounds()

PySide2.QtLocation.QGeoRoute. distance ( )
返回类型

qreal

Returns the distance covered by this route, in meters.

另请参阅

setDistance()

PySide2.QtLocation.QGeoRoute. extendedAttributes ( )
返回类型

Returns the extended attributes associated with this route.

PySide2.QtLocation.QGeoRoute. firstRouteSegment ( )
返回类型

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 )
参数

other QGeoRoute

返回类型

bool

Returns whether this route and other are not equal.

PySide2.QtLocation.QGeoRoute. __eq__ ( other )
参数

other QGeoRoute

返回类型

bool

Returns whether this route and other are equal.

PySide2.QtLocation.QGeoRoute. path ( )
返回类型

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.

另请参阅

setPath()

PySide2.QtLocation.QGeoRoute. request ( )
返回类型

QGeoRouteRequest

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

另请参阅

setRequest()

PySide2.QtLocation.QGeoRoute. routeId ( )
返回类型

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.

另请参阅

setRouteId()

PySide2.QtLocation.QGeoRoute. setBounds ( bounds )
参数

bounds QGeoRectangle

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

另请参阅

bounds()

PySide2.QtLocation.QGeoRoute. setDistance ( distance )
参数

distance qreal

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

另请参阅

distance()

PySide2.QtLocation.QGeoRoute. setExtendedAttributes ( extendedAttributes )
参数

extendedAttributes

Sets the extended attributes extendedAttributes associated with this route.

PySide2.QtLocation.QGeoRoute. setFirstRouteSegment ( routeSegment )
参数

routeSegment QGeoRouteSegment

Sets the first route segment in the route to routeSegment .

PySide2.QtLocation.QGeoRoute. setPath ( path )
参数

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.

另请参阅

path()

PySide2.QtLocation.QGeoRoute. setRequest ( request )
参数

request QGeoRouteRequest

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

另请参阅

request()

PySide2.QtLocation.QGeoRoute. setRouteId ( id )
参数

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.

另请参阅

routeId()

PySide2.QtLocation.QGeoRoute. setTravelMode ( mode )
参数

mode TravelMode

Sets the travel mode for this route to mode .

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

另请参阅

travelMode()

PySide2.QtLocation.QGeoRoute. setTravelTime ( secs )
参数

secs int

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

另请参阅

travelTime()

PySide2.QtLocation.QGeoRoute. travelMode ( )
返回类型

TravelMode

Returns the travel mode for the this route.

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

另请参阅

setTravelMode()

PySide2.QtLocation.QGeoRoute. travelTime ( )
返回类型

int

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

另请参阅

setTravelTime()