Location QML Type
The Location type holds location data. More...
Import Statement: | import QtPositioning 5.12 |
Since: | Qt 5.2 |
Properties
- address : Address
- boundingBox : georectangle
- coordinate : coordinate
- location : QGeoLocation
Detailed Description
Location types represent a geographic "location", in a human sense. This consists of a specific coordinate, an address and a bounding box. The bounding box represents the recommended region to display when viewing this location.
The Location type is most commonly seen as the contents of a search model such as the GeocodeModel. When a GeocodeModel returns the list of locations found for a given query, it represents these as Location objects.
Example Usage
The following example shows a simple Location object being declared:
Location { coordinate { latitude: -27.3 longitude: 153.1 } address: Address { ... } }
Property Documentation
address : Address |
This property holds the address of the location which can be use to retrieve address details of the location.
boundingBox : georectangle |
This property holds the recommended region to use when displaying the location. For example, a building's location may have a region centered around the building, but the region is large enough to show it's immediate surrounding geographical context.
Note: this property's changed() signal is currently emitted only if the whole object changes, not if only the contents of the object change.
coordinate : coordinate |
This property holds the exact geographical coordinate of the location which can be used to retrieve the latitude, longitude and altitude of the location.
Note: this property's changed() signal is currently emitted only if the whole object changes, not if only the contents of the object change.
For details on how to use this property to interface between C++ and QML see "Interfaces between C++ and QML Code".
© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.