The Waypoint type provides a mean to specify a waypoint in a RouteQuery in a more detailed way than by using a simple coordinate . 更多...
import 语句: | import QtLocation 5.15 |
Since: | QtLocation 5.11 |
A Waypoint is a type that allows to specify properties of a waypoint in a RouteQuery , such as the waypoint coordinate, or the angle of approach to the waypoint.
Additional information that are backend-specific can be specified by nesting MapParameter 元素。
Changing properties of the waypoint or of its nested MapParameteters will cause the containing RouteQuery to emit the queryDetailsChanged signal.
Plugin { id: aPlugin name: "osm" } Waypoint { id: waypointStart coordinate: ... bearing: ... } Waypoint { id: waypointFinish coordinate: ... bearing: ... } RouteQuery { id: aQuery Component.onCompleted: { travelModes = RouteQuery.CarTravel addWaypoint(waypointStart) var aWaypoint = Qt.createQmlObject ('import QtLocation 5.11; Waypoint { ... }', ...) addWaypoint(aWaypoint) addWaypoint(waypointFinish) } } RouteModel { id: routeModel plugin: aPlugin query: aQuery autoUpdate: true }
另请参阅 RouteQuery .
altitude : real |
The altitude of the waypoint's coordinate. The default value is NaN. Changing this property will affect the Waypoint::coordinate property as well.
bearing : real |
The bearing specifying the angle of approach of the waypoint, that is the bearing with which the waypoint is to be approached. This information may be used by the provider to filter the road segment the waypoint will be placed on, and, depending on the provider and the travel mode used, to restrict the maneuvers allowed at the waypoint, potentially making the provider calculating and returning a different route.
If set to NaN, this value will not be considered.
The default value is NaN.
coordinate : coordinate |
The waypoint's coordinate. The default value is undefined.
latitude : real |
The latitude of the waypoint's coordinate. The default value is NaN. Changing this property will affect the Waypoint::coordinate property as well.
longitude : real |
The longitude of the waypoint's coordinate. The default value is NaN. Changing this property will affect the Waypoint::coordinate property as well.
The waypoint metadata. This property is read only. If the waypoint is defined by the user, these can be set by using MapParameters. If the waypoint comes from the engine via signals, or as part of a read-only route query, the waypoint is intended to be read-only.