Revision control

Copy as Markdown

// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\module QtLocation
\title Qt Location C++ Classes
\ingroup modules
\qtvariable location
\brief Provides C++ interfaces to retrieve location and navigational
information.
The C++ API provides access to geocoding and navigation information,
and also place search. Use the \l{Maps and Navigation (QML)}{QML}
API to render this information on an interactive map that supports
touch gestures, overlays, and so on.
Include the appropriate header in your C++ code. For example,
applications using routes can include:
\code
#include <QGeoRoute>
\endcode
Add the \e location keyword in the project file to link against the
Qt Location library:
\badcode
QT += location
\endcode
See more in the \l{Qt Location}{Qt Location Overview}.
*/
/*!
\page qtlocation-index.html
\title Qt Location
\brief Provides QML and C++ interfaces to create location-aware
applications.
\ingroup technology-apis
The Qt Location module helps you create mapping solutions using data available
from popular location service providers, such as
\l {http://openstreetmap.org}{Open Street Map}.
The Qt Location API enables you to:
\list
\li Access and present map data.
\li Support touch gesture on a specific area of the map.
\li Query for a specific geographical location and route.
\li Add additional layers on top, such as polylines and circles.
\li Search for places and related images.
\endlist
\section1 Using the Module
\section2 QML API
To use the types, add the following import statements to your \c .qml file:
\qml \QtVer
import QtPositioning
import QtLocation
\endqml
\note Many Qt Location QML module APIs are using types from the Qt Positioning
module. For example, defining a coordinate to be the center of the map requires
types from the Qt Positioning module.
\section2 C++ API
For C++ projects, include the header appropriate for the current use case;
for example, applications using routes may use:
\code
#include <QGeoRoute>
\endcode
\include {module-use.qdocinc} {using the c++ api}
\section3 Building with CMake
\include {module-use.qdocinc} {building with cmake} {Location}
\section3 Building with qmake
\include {module-use.qdocinc} {building_with_qmake} {location}
\section1 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 \l {QtPositioning} module.
\section2 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.
\table
\row
\li Places introduction:
\li \l{QML Places API}{for QML}
\li \l{Places (C++)}{for C++}
\endtable
\section2 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.
\table
\row
\li Maps and Navigation introduction:
\li \l{Maps and Navigation (QML)}{for QML}
\li \l{Maps and Navigation (C++)}{for C++}
\endtable
\section1 Examples
\table
\row
\li \l {Qt Location Examples}{Example Apps}
\li Examples demonstrating use of the Qt Location APIs
\row
\li \l {QML Maps}{Maps and Navigation Tutorial}
\li Tutorial introducing the QML Maps Types
\endtable
\section1 API Reference
The following are lists of the classes and UI components provided by the module,
with example applications to demonstrate their usage:
\table
\row
\li \l {Qt Location QML Types}{QML API Reference}
\li Full list of QML components in the Qt Location API
\row
\li \l {Qt Location C++ API}{C++ API Reference by domain}
\li Full list of C++ classes and methods of the Qt Location APIs sorted by domain
\row
\li \l {Qt Location C++ Classes}{C++ API Reference}
\li Full list of C++ classes and methods of the Qt Location APIs
\endtable
\section1 Plugin References and Parameters
Information about plugins, important notes on their usage, parameters that can
be provided to influence their behavior.
\annotatedlist QtLocation-plugins
\section2 Implementing New Back-Ends and Porting
For systems integrators and distributors, information related to making
Qt Location available for a new platform.
\table
\row
\li \l {Qt Location GeoServices}{GeoServices}
\li Information about the Qt Location GeoServices plugins
\row
\li \l {Places Backend} {Places}
\li Information for places backend implementors
\row
\li \l {Changes to Qt Location}{API changes}
\li Information about porting from Qt 5 to Qt 6
\endtable
\section1 Licenses
Qt Location is available under commercial licenses from \l{The Qt Company}.
In addition, it is available under the
\l{GNU Lesser General Public License, version 3}, or
the \l{GNU General Public License, version 2}.
See \l{Qt Licensing} for further details.
*/