The Qt Location API helps you create viable mapping solutions using the data available from some of the popular location services.
Qt Location API 能夠:
To load the Qt Location module, add the following statement to your .qml files
import QtPositioning 5.15 import QtLocation 5.15
The QtLocation QML module depends on the QtPositioning QML module. Therefore every QML application that imports the QtLocation QML module must always import the QtPositioning module as well.
對於 include 當前使用情況適當 header 的 C++ 工程,例如,使用路由的應用程序可以使用
#include <QGeoRoute>
.pro 文件應有 location 添加關鍵詞
QT += location
The API is split into sub-modules, which provide QML and C++ interfaces for specific purposes. They focus mainly on Map and Place information. The required position data can be retrieved using the QtPositioning 模塊。
The Places submodule is the natural complement to Positioning, providing a source of geographical data about Places of Interest (POI). Besides the source information, the API provides information about the location, size, and other related information about a POI. The Places API can also retrieve images, reviews, and other content related to a place.
| Places introduction: | for QML | for C++ |
The module provides the QML and C++ alternatives for maps and navigation. The C++ alternative provides utility classes to get geocoding (finding a geographic coordinate from a street address) and navigation (including driving and walking directions) information, whereas its QML counterpart provides UI components to render the information.
| Maps and Navigation introduction: | for QML | for C++ |
The following are lists of the classes and UI components provided by the module, with example applications to demonstrate their usage:
| QML API 參考 | Full list of QML components in the Qt Location API |
| C++ API 參考按領域 | Full list of C++ classes and methods of the Qt Location APIs sorted by domain |
| C++ API 參考 | Full list of C++ classes and methods of the Qt Location APIs |
| 範例 App | Examples demonstrating use of the Qt Location APIs |
| 地圖和導航教程 | Tutorial introducing the QML Maps Types |
Information about plugins, important notes on their usage, parameters that can be provided to influence their behavior.
For systems integrators and distributors, information related to making Qt Location available for a new platform.
| GeoServices | Information about the Qt Location GeoServices plugins |
| Places | Information for places backend implementors |
| API 變化 | Information about QML API changes since 5.4 |
Qt Location 在商業許可下是可用的來自 Qt 公司 。此外,它是可用的根據 GNU LGPL (次一般公共許可) 第 3 版 ,或 GNU GPL (一般公共許可) 第 2 版 。見 Qt 許可 進一步瞭解細節。
此外,Qt Location 潛在包含的第 3 方模塊遵循下列準許許可:
| Boost 軟件許可 1.0 | |
| MIT 許可 | |
| MIT 許可 | |
| Boost 軟件許可 1.0 | |
| ISC 許可 | |
| ISC 許可 | |
| BSD 2-clause "Simplified" License and zlib License | |
| Boost 軟件許可 1.0 | |
| BSD 3 條款新 (或修訂) 許可 | |
| MIT 許可 | |
| ISC 許可 | |
| MIT 許可 | |
| MIT 許可 | |
| ISC 許可 | |
| ISC 許可 | |
| ISC 許可 | |
| geosimplify-js License | |
| ISC 許可 | |
| MIT 許可 | |
| ISC 許可 | |
| BSD 2 條款簡化許可 | |
| ISC 許可 | |
| ISC 許可 | |
| MIT 許可 | |
| Boost 軟件許可 1.0 | |
| BSD 3 條款新 (或修訂) 許可 |