RouteSegmentThe RouteSegment element represents a segment of a Route. More... Inherits QtObject This type was introduced in Qt Location 5.0. Properties
Detailed DescriptionA RouteSegment instance has information about the physical layout of the route segment, the length of the route and estimated time required to traverse the route segment and optional RouteManeuvers associated with the end of the route segment. RouteSegment instances can be thought of as edges on a routing graph, with RouteManeuver instances as optional labels attached to the vertices of the graph. The primary means of acquiring Route elements is via Routes via RouteModel. ExampleThe following QML snipplet demonstrates how to print information about a route segment: import QtQuick 2.0 import QtLocation 5.0 Text { text: "Segment distance " + routeSegment.distance + " meters, " + routeSegment.path.length + " points." } Property DocumentationRead-only property which holds the distance covered by this segment of the route, in meters. Read-only property which holds the maneuver for this route segment. Will return invalid maneuver if no information has been attached to the endpoint of this route segment. Read-only property which holds the geographical coordinates of this segment. Coordinates are listed in the order in which they would be traversed by someone traveling along this segment of the route. To access individual segments you can use standard list accessors: 'path.length' indicates the number of elements and 'path[index starting from zero]' gives the actual element. See also Coordinate. Read-only property which holds the estimated amount of time it will take to traverse this segment, in seconds. |