1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
9 \title Qt Location C++ Classes
13 \brief Provides C++ interfaces to retrieve location and navigational
16 The C++ API provides access to geocoding and navigation information,
17 and also place search. Use the \l{Maps and Navigation (QML)}{QML}
18 API to render this information on an interactive map that supports
19 touch gestures, overlays, and so on.
21 Include the appropriate header in your C++ code. For example,
22 applications using routes can include:
28 Add the \e location keyword in the project file to link against the
35 See more in the \l{Qt Location}{Qt Location Overview}.
42\page qtlocation-index.html
44\brief Provides QML and C++ interfaces to create location-aware
46\ingroup technology-apis
48The Qt Location module helps you create mapping solutions using data available
49from popular location service providers, such as
50\l {http://openstreetmap.org}{Open Street Map}.
52The Qt Location API enables you to:
54 \li Access and present map data.
55 \li Support touch gesture on a specific area of the map.
56 \li Query for a specific geographical location and route.
57 \li Add additional layers on top, such as polylines and circles.
58 \li Search for places and related images.
61\section1 Using the Module
65To use the types, add the following import statements to your \c .qml file:
72\note Many Qt Location QML module APIs are using types from the Qt Positioning
73module. For example, defining a coordinate to be the center of the map requires
74types from the Qt Positioning module.
78For C++ projects, include the header appropriate for the current use case;
79for example, applications using routes may use:
85\include {module-use.qdocinc} {using the c++ api}
87\section3 Building with CMake
89\include {module-use.qdocinc} {building with cmake} {Location}
91\section3 Building with qmake
93\include {module-use.qdocinc} {building_with_qmake} {location}
97The API is split into sub-modules, which provide QML and C++ interfaces for
98specific purposes. They focus mainly on Map and Place information. The required
99position data can be retrieved using the \l {QtPositioning} module.
103The Places submodule is the natural complement to Positioning, providing a
104source of geographical data about Places of Interest (POI). Besides the source
105information, the API provides information about the location, size, and
106other related information about a POI. The Places API can also
107retrieve images, reviews, and other content related to a place.
111 \li Places introduction:
112 \li \l{QML Places API}{for QML}
113 \li \l{Places (C++)}{for C++}
116\section2 Maps and Navigation
118The module provides the QML and C++ alternatives for maps and navigation. The
119C++ alternative provides utility classes to get geocoding (finding a geographic
120coordinate from a street address) and navigation (including driving and walking
121directions) information, whereas its QML counterpart provides UI components to
122render the information.
126\li Maps and Navigation introduction:
127 \li \l{Maps and Navigation (QML)}{for QML}
128 \li \l{Maps and Navigation (C++)}{for C++}
134 \li \l {Qt Location Examples}{Example Apps}
135 \li Examples demonstrating use of the Qt Location APIs
137 \li \l {QML Maps}{Maps and Navigation Tutorial}
138 \li Tutorial introducing the QML Maps Types
141\section1 API Reference
143The following are lists of the classes and UI components provided by the module,
144with example applications to demonstrate their usage:
148 \li \l {Qt Location QML Types}{QML API Reference}
149 \li Full list of QML components in the Qt Location API
151 \li \l {Qt Location C++ API}{C++ API Reference by domain}
152 \li Full list of C++ classes and methods of the Qt Location APIs sorted by domain
154 \li \l {Qt Location C++ Classes}{C++ API Reference}
155 \li Full list of C++ classes and methods of the Qt Location APIs
158\section1 Plugin References and Parameters
160Information about plugins, important notes on their usage, parameters that can
161be provided to influence their behavior.
163\annotatedlist QtLocation-plugins
165\section2 Implementing New Back-Ends and Porting
167For systems integrators and distributors, information related to making
168Qt Location available for a new platform.
172 \li \l {Qt Location GeoServices}{GeoServices}
173 \li Information about the Qt Location GeoServices plugins
175 \li \l {Places Backend} {Places}
176 \li Information for places backend implementors
178 \li \l {Changes to Qt Location}{API changes}
179 \li Information about porting from Qt 5 to Qt 6
182\section1 Licenses and Attributions
184Qt Location is available under commercial licenses from \l{The Qt Company}.
185In addition, it is available under the
186\l{GNU Lesser General Public License, version 3}, or
187the \l{GNU General Public License, version 2}.
188See \l{Qt Licensing} for further details.
190Furthermore Qt Location potentially contains third party
191modules under following permissive licenses:
193\generatelist{groupsbymodule attributions-qtlocation}