Qt Location

The Qt Location API helps you create viable mapping solutions using the data available from some of the popular location services.

Overview

The Qt Location API enables you to:

  • access and present map data,
  • support touch gesture on a specific area of the map,
  • query for a specific geographical location and route,
  • add additional layers on top, such as polylines and circles,
  • and search for places and related images.

Getting Started

To load the Qt Location module, add the following statement to your .qml files

import QtPositioning 5.12
import QtLocation 5.12

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

Submodules

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.

Places

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 QMLfor C++

Maps and Navigation

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 QMLfor C++

API References and Examples

The following are lists of the classes and UI components provided by the module, with example applications to demonstrate their usage:

QML API ReferenceFull list of QML components in the Qt Location API
C++ API Reference by domainFull list of C++ classes and methods of the Qt Location APIs sorted by domain
C++ API ReferenceFull list of C++ classes and methods of the Qt Location APIs
Example AppsExamples demonstrating use of the Qt Location APIs
Maps and Navigation TutorialTutorial introducing the QML Maps Types

Plugin References and Parameters

Information about plugins, important notes on their usage, parameters that can be provided to influence their behavior.

Qt Location Esri Plugin

Uses Esri for location services.

Qt Location HERE Plugin

Uses the relevant services provided by HERE.

Qt Location Items Overlay Plugin

Provides an empty map intended to be used as background for an overlay layers for map items.

Qt Location Mapbox GL Plugin

Uses Mapbox GL for location services.

Qt Location Mapbox Plugin

Uses Mapbox for location services.

Qt Location Open Street Map Plugin

Uses Open Street Map and related services.

Implementing New Back-Ends and Porting

For systems integrators and distributors, information related to making Qt Location available for a new platform.

GeoServicesInformation about the Qt Location GeoServices plugins
PlacesInformation for places backend implementors
API changesInformation about QML API changes since 5.4

Licenses and Attributions

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:

Boost

Boost Software License 1.0

CSS Color Parser

MIT License

Clip2Tri Polygon Triangulation Library

MIT License

Clipper Polygon Clipping Library, version 6.4.0

Boost Software License 1.0

Earcut

ISC License

Earcut Polygon Triangulation Library

ISC License

Mapbox GL Native

BSD 2-clause "Simplified" License

Poly2Tri Polygon Triangulation Library

BSD 3-clause "New" or "Revised" License

RapidJSON

MIT License

Vector Tile Library

ISC License

Wagyu Geometry Processing Library

MIT License

cURL Parse Date

MIT License

geojson-cpp

ISC License

geojson-vt-cpp

ISC License

geometry.hpp

ISC License

kdbush.hpp

ISC License

libc++

MIT and UIUC (BSD-like)

nunicode

MIT License

polylabel

ISC License

protozero

BSD 2-clause "Simplified" License

shelf-pack-cpp

ISC License

supercluster.hpp

ISC License

tao_tuple

MIT License

unique_resource

Boost Software License 1.0

variant

BSD 3-clause "New" or "Revised" License

© 2019 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.