The Qt Location API helps you create viable mapping solutions using the data available from some of the popular location services.
The Qt Location API enables you to:
To load the Qt Location module, add the following statement to your .qml files
import QtPositioning 6.4 import QtLocation 6.4
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.
For C++ projects include the header appropriate for the current use case, for example applications using routes may use
#include <QGeoRoute>
The .pro file should have the location keyword added
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 module.
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.
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.
The following are lists of the classes and UI components provided by the module, with example applications to demonstrate their usage:
QML API Reference | Full list of QML components in the Qt Location API |
C++ API Reference by domain | Full list of C++ classes and methods of the Qt Location APIs sorted by domain |
C++ API Reference | Full list of C++ classes and methods of the Qt Location APIs |
Example Apps | Examples demonstrating use of the Qt Location APIs |
Maps and Navigation Tutorial | Tutorial introducing the QML Maps Types |
Information about plugins, important notes on their usage, parameters that can be provided to influence their behavior.
Uses Esri for location services. |
|
Uses the relevant services provided by HERE. |
|
Provides an empty map intended to be used as background for an overlay layers for map items. |
|
Uses Mapbox for location services. |
|
Uses Maplibre GL for location services. |
|
Uses Open Street Map and related services. |
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 changes | Information about QML API changes since 5.4 |
Qt Location is available under commercial licenses from The Qt Company. In addition, it is available under the GNU Lesser General Public License, version 3, or the GNU General Public License, version 2. See Qt Licensing for further details.
Furthermore Qt Location potentially contains third party modules under following permissive licenses:
ISC License |
|
geosimplify-js License |