Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

RouteQuery

The 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 Description

A 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 Usage

The 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 Documentation

read-onlyexcludedAreas : QQmlListProperty<BoundingBox>

Areas 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.


read-onlyfeatureTypes : QList<FeatureType>

List of features that will be considered when planning the route. Features with a weight of NeutralFeatureWeight will not be returned.

  • RouteQuery.NoFeature - No features will be taken into account when planning the route
  • RouteQuery.TollFeature - Consider tollways when planning the route
  • RouteQuery.HighwayFeature - Consider highways when planning the route
  • RouteQuery.PublicTransitFeature - Consider public transit when planning the route
  • RouteQuery.FerryFeature - Consider ferries when planning the route
  • RouteQuery.TunnelFeature - Consider tunnels when planning the route
  • RouteQuery.DirtRoadFeature - Consider dirt roads when planning the route
  • RouteQuery.ParksFeature - Consider parks when planning the route
  • RouteQuery.MotorPoolLaneFeature - Consider motor pool lanes when planning the route

See also setFeatureWeight and featureWeight.


maneuverDetail : ManeuverDetail

The level of detail which will be used in the representation of routing maneuvers. Values can be combined with OR ('|') -operator.

  • RouteQuery.NoManeuvers - No maneuvers should be included with the route
  • RouteQuery.BasicManeuvers - Basic maneuvers will be included with the route

The default value is RouteQuery.BasicManeuvers


numberAlternativeRoutes : int

The number of alternative routes requested when requesting routes. The default value is 0.


routeOptimizations : RouteOptimizations

The route optimizations which should be considered during the planning of the route. Values can be combined with OR ('|') -operator.

  • RouteQuery.ShortestRoute - Minimize the length of the journey
  • RouteQuery.FastestRoute - Minimize the traveling time for the journey
  • RouteQuery.MostEconomicRoute - Minimize the cost of the journey
  • RouteQuery.MostScenicRoute - Maximize the scenic potential of the journey

The default value is RouteQuery.FastestRoute


segmentDetail : SegmentDetail

The level of detail which will be used in the representation of routing segments. Values can be combined with OR ('|') -operator.

  • RouteQuery.NoSegmentData - No segment data should be included with the route
  • RouteQuery.BasicSegmentData - Basic segment data will be included with the route

The default value is RouteQuery.BasicSegmentData


travelModes : enumeration

The travel modes which should be considered during the planning of the route. Values can be combined with OR ('|') -operator.

  • RouteQuery.CarTravel - The route will be optimized for someone who is driving a car
  • RouteQuery.PedestrianTravel - The route will be optimized for someone who is walking
  • RouteQuery.BicycleTravel - The route will be optimized for someone who is riding a bicycle
  • RouteQuery.PublicTransitTravel - The route will be optimized for someone who is making use of public transit
  • RouteQuery.TruckTravel - The route will be optimized for someone who is driving a truck

The default value is RouteQuery.CarTravel


read-onlywaypoints : QQmlListProperty<Coordinate>

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 Documentation

FeatureWeight RouteQuery::featureWeight(FeatureType featureType)

Gets the weight for the featureType.

See also featureTypes, setFeatureWeight, and resetFeatureWeights.


RouteQuery::addExcludedArea(BoundingBox)

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.


RouteQuery::addWaypoint(Coordinate)

Appends a coordinate to the list of waypoints. Same coordinate can be set multiple times.

See also removeWaypoint and clearWaypoints.


RouteQuery::clearExcludedAreas()

Clears all excluded areas (areas that the route must not cross).

See also addExcludedArea and removeExcludedAreas.


RouteQuery::clearWaypoints()

Clears all waypoints.

See also removeWaypoint and addWaypoints.


RouteQuery::removeExcludedArea(BoundingBox)

Removes the given area to excluded areas (areas that the route must not cross).

See also addExcludedArea and clearExcludedAreas.


RouteQuery::removeWaypoint(Coordinate)

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.


RouteQuery::resetFeatureWeights()

Resets all feature weights to their default state (NeutralFeatureWeight).

See also featureTypes, setFeatureWeights, and featureWeight.


RouteQuery::setFeatureWeight(FeatureType, FeatureWeight)

Defines the weight to associate with a feature during the planning of a route.

Following lists the possible feature weights:

  • RouteQuery.NeutralFeatureWeight - The presence or absence of the feature will not affect the planning of the route
  • RouteQuery.PreferFeatureWeight - Routes which contain the feature will be preferred over those that do not
  • RouteQuery.RequireFeatureWeight - Only routes which contain the feature will be considered, otherwise no route will be returned
  • RouteQuery.AvoidFeatureWeight - Routes which do not contain the feature will be preferred over those that do
  • RouteQuery.DisallowFeatureWeight - Only routes which do not contain the feature will be considered, otherwise no route will be returned

See also featureTypes, resetFeatureWeights, and featureWeight.


Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web