RouteQueryThe RouteQuery element is used to provide query parameters to a RouteModel. More... Inherits QtObject This type was introduced in Qt Location 5.0. Properties
Methods
Detailed DescriptionA RouteQuery contains all the parameters necessary to make a request to a routing service, which can then populate the contents of a RouteModel. These parameters describe key details of the route, such as waypoints to pass through, excludedAreas to avoid, the travelModes in use, as well as detailed preferences on how to optimize the route and what features to prefer or avoid along the path (such as toll roads, highways, etc). RouteQuery elements are used exclusively to fill out the value of a RouteModel's query property, which can then begin the retrieval process to populate the model. Example UsageThe following snipped shows an incomplete example of creating a RouteQuery element and setting it as the value of a RouteModel's query property. RouteQuery {
id: aQuery
}
RouteModel {
query: aQuery
autoUpdate: false
}
For a more complete example, see the documentation for the RouteModel element, and the Mapviewer example. See also RouteModel. Property DocumentationAreas that the route must not cross. Excluded areas can be set as part of the RouteQuery element declaration or dynamically with the functions provided. See also addExcludedArea, removeExcludedArea, and clearExcludedAreas. List of features that will be considered when planning the route. Features with a weight of NeutralFeatureWeight will not be returned.
See also setFeatureWeight and featureWeight. The level of detail which will be used in the representation of routing maneuvers. Values can be combined with OR ('|') -operator.
The default value is RouteQuery.BasicManeuvers The number of alternative routes requested when requesting routes. The default value is 0. The route optimizations which should be considered during the planning of the route. Values can be combined with OR ('|') -operator.
The default value is RouteQuery.FastestRoute The level of detail which will be used in the representation of routing segments. Values can be combined with OR ('|') -operator.
The default value is RouteQuery.BasicSegmentData The travel modes which should be considered during the planning of the route. Values can be combined with OR ('|') -operator.
The default value is RouteQuery.CarTravel The waypoint coordinates of the desired route. The waypoints should be given in order from origin to destination. Two or more coordinates are needed. Waypoints can be set as part of the RouteQuery element declaration or dynamically with the functions provided. See also addWaypoint, removeWaypoint, and clearWaypoints. Method DocumentationGets the weight for the featureType. See also featureTypes, setFeatureWeight, and resetFeatureWeights. Adds the given area to excluded areas (areas that the route must not cross). Same area can only be added once. See also removeExcludedArea and clearExcludedAreas. Appends a coordinate to the list of waypoints. Same coordinate can be set multiple times. See also removeWaypoint and clearWaypoints. Clears all excluded areas (areas that the route must not cross). See also addExcludedArea and removeExcludedAreas. Clears all waypoints. See also removeWaypoint and addWaypoints. Removes the given area to excluded areas (areas that the route must not cross). See also addExcludedArea and clearExcludedAreas. Removes the given from the list of waypoints. In case same coordinate appears multiple times, the most recently added coordinate instance is removed. See also addWaypoint and clearWaypoints. Resets all feature weights to their default state (NeutralFeatureWeight). See also featureTypes, setFeatureWeights, and featureWeight. Defines the weight to associate with a feature during the planning of a route. Following lists the possible feature weights:
See also featureTypes, resetFeatureWeights, and featureWeight. |