Provided that a position has been obtained, the Qt Location module can add a Map with Places of Interest (POI) and Places . The user can be made aware of nearby features and related information, displayed on the map. These features can be places of business, entertainment, and so on. They may include paths, roads, or forms of transport, enabling navigation optimization and assistance.
To perform navigation we need route s from start to destination. These routes are made up of segments, where each routeSegment can be considered a navigation subtask; for example, "drive 100 meters", or "turn left". The beginning and end of each segment is a waypoint , that is, one part of the journey.
A typical use case for the API is a user looking for a particular type of place, such as a restaurant; the user enters a search string into the map application and is presented with a list of results for restaurants "near" the device. The application can then be used to navigate to the chosen destination using a route that is optimized according to features in the environment that may help or hinder the journey. The navigation then proceeds with the user's progress monitored by means of the current location.
In short, the main QML types and their roles are as follows:
Plugin s supply the data required to calculate routes and navigation instructions, and they are typically tied to a specific location-based service. For example, a plugin may allow connecting to a service that provides geocoding and routing information, which can be consumed by the application.
There may be various GeoServices plugins for various tasks, with some plugins providing more than one service. One QML Plugin instance must be created for each GeoService plugin. Plugins are required for routing and geocoding, maps, and places, however the default plugin handles all four of these services. A plugin may require online access or it may support on-board maps and data.
注意: Plugins may not provide features such as paging or relevance hints.
The following links provide more information about maps and places:
Maps and Navigation | Displaying maps and finding routes |
Places | Searching for and managing points of interest |
Plugin | Type describes a Location based services plugin |
PluginParameter | Type describes a parameter for a plugin |
Map | Type displays a map |
MapCircle | Type displays a geographic circle on a Map |
MapCopyrightNotice | Item displays the current valid copyright notice for a Map element |
MapItemGroup | Type is a container for map items |
MapItemView | Used to populate Map from a model |
MapPolygon | Type displays a polygon on a Map |
MapPolyline | Type displays a polyline on a map |
MapQuickItem | Type displays an arbitrary Qt Quick object on a Map |
MapRectangle | Type displays a rectangle on a Map |
MapRoute | Type displays a Route on a Map |
cameraCapabilities | Type holds information about the camera capabilities for a specific map type |
mapType | Type holds information about a map type |
RouteModel | Type provides access to routes |
RouteQuery | Type is used to provide query parameters to a RouteModel |
route | Type represents one geographical route |
routeManeuver | Type represents the information relevant to the point at which two routeSegments meet |
routeSegment | Type represents a segment of a Route |
GeocodeModel | Type provides support for searching operations related to geographic information |
Category | Type represents a category that a Place can be associated with |
CategoryModel | Type provides a model of the categories supported by a Plugin |
ContactDetails | Type holds contact details for a Place |
EditorialModel | Type provides a model of place editorials |
ExtendedAttributes | Type holds additional data about a Place |
ImageModel | Type provides a model of place images |
Place | Type represents a location that is a position of interest |
PlaceSearchModel | Provides access to place search results |
PlaceSearchSuggestionModel | Provides access to search term suggestions |
ReviewModel | Type provides a model of place reviews |
contactDetail | Type holds a contact detail such as a phone number or a website address |
icon | Type represents the icon of a place |
placeAttribute | Type holds generic place attribute information |
ratings | Type holds place rating information |
supplier | Holds data regarding the supplier of a place, a place's image, review, or editorial |
user | Type identifies a user who contributed a particular Place content item |
Category | Type represents a category that a Place can be associated with |
CategoryModel | Type provides a model of the categories supported by a Plugin |
ContactDetails | Type holds contact details for a Place |
EditorialModel | Type provides a model of place editorials |
ExtendedAttributes | Type holds additional data about a Place |
GeocodeModel | Type provides support for searching operations related to geographic information |
ImageModel | Type provides a model of place images |
Map | Type displays a map |
MapCircle | Type displays a geographic circle on a Map |
MapCopyrightNotice | Item displays the current valid copyright notice for a Map element |
MapItemGroup | Type is a container for map items |
MapItemView | Used to populate Map from a model |
MapPolygon | Type displays a polygon on a Map |
MapPolyline | Type displays a polyline on a map |
MapQuickItem | Type displays an arbitrary Qt Quick object on a Map |
MapRectangle | Type displays a rectangle on a Map |
MapRoute | Type displays a Route on a Map |
MapView | An interactive map viewer component |
Place | Type represents a location that is a position of interest |
PlaceSearchModel | Provides access to place search results |
PlaceSearchSuggestionModel | Provides access to search term suggestions |
Plugin | Type describes a Location based services plugin |
PluginParameter | Type describes a parameter for a plugin |
ReviewModel | Type provides a model of place reviews |
RouteModel | Type provides access to routes |
RouteQuery | Type is used to provide query parameters to a RouteModel |
cameraCapabilities | Type holds information about the camera capabilities for a specific map type |
contactDetail | Type holds a contact detail such as a phone number or a website address |
icon | Type represents the icon of a place |
mapType | Type holds information about a map type |
placeAttribute | Type holds generic place attribute information |
ratings | Type holds place rating information |
route | Type represents one geographical route |
routeManeuver | Type represents the information relevant to the point at which two routeSegments meet |
routeSegment | Type represents a segment of a Route |
supplier | Holds data regarding the supplier of a place, a place's image, review, or editorial |
user | Type identifies a user who contributed a particular Place content item |