Maps and Navigation (QML)Maps and Navigation provides QtQuick user interface elements for displaying geographic information on a map, as well as allowing user interaction with map overlay objects and the display itself. It also contains utilities for geocoding (finding a geographic coordinate from a street address) and navigation (including driving and walking directions). It builds upon the API concepts and elements in the QML Positioning API. MapsDisplaying MapsDisplaying a map is done using the Map QML element. The Map element supports user interaction through the MapFlickable and MapPinchArea QML elements. The Map element draws the map on-screen using OpenGL (ES), allowing for hardware-accelerated rendering where available. Key Elements
Note that the client must create a Plugin element prior to using a Map element in order to have access to map data to display. Putting Objects on a Map (Map Overlay Objects)Maps can also contain map overlay objects, which are used to display information on its surface. There is a set of basic pre-defined map overlay objects, as well as the ability to implement custom map overlay objects using the MapQuickItem element, which can contain any standard QtQuick item. Key Elements
Model-View Design with Map Overlay ObjectsTo automatically generate map overlay objects based on the contents of a QtQuick model (for example a ListModel item), the MapItemView element is available. It accepts any map overlay object as its delegate, and can only be created within a Map. Key Elements
Interaction with Map Overlay ObjectsInteraction with the pre-defined map overlay object types is done using the MapMouseArea element, which behaves much like a normal QtQuick MouseArea. MapQuickItems can also contain MapMouseArea elements, but can additionally use normal QtQuick MouseAreas to provide interaction. Properties of map overlay objects that influence their appearance on the display can be changed at any time, and many can also be used in animations. Animating coordinate-based map overlay objects, such as MapPolygon and MapPolyline, is not yet available. Key Elements
Geocoding -- Address to Coordinate and Vice VersaGeocoding is the translation of geographic coordinates into addresses, or vice versa. Such a translation usually involves sending the source data to a server which then performs the translation and returns the results, although some location-based service provider plugins may be able to provide some geocoding functionality without sending data to a remote server. The availability and accuracy of the translation usually depends on the location or address being translated, as different areas of the Earth are mapped to varying degrees of accuracy. A geocoding query in QML is performed using the GeocodeModel element. For an address-to-coordinate query, its query property may be set to either an Address element or a string containing the textual form of the address to search for. To perform the reverse, the same property can be set to a Coordinate instead. Results are made available in the contents of the model. Key Elements
Note that the client must create a Plugin element prior to using a GeocodeModel element in order to have access to geocoding translation services and thus data to display. Routing and NavigationRouting is the determination of a navigable path from one point to another on a map. Given a map that is aware of features that aid or hinder navigation, such as bridges, waterways and so on, a series of segments that make up the journey can be constructed. If these RouteSegments are simple then we can add navigation information at the connecting points, RouteManeuvers, between the segments. Key Elements
|