<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qtpositioning.qdoc --> <title>Qt Positioning 5.11</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css"); // loading style sheet breaks anchors that were jumped to before // so force jumping to anchor again setTimeout(function() { var anchor = location.hash; // need to jump to different anchor first (e.g. none) location.hash = "#"; setTimeout(function() { location.hash = anchor; }, 0); }, 0); </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <table><tr> <td ><a href="../qtdoc/index.html">Qt 5.11</a></td><td >Qt Positioning</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right">Qt 5.11.2 Reference Documentation</td> </tr></table> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <div class="sidebar"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#overview">Overview</a></li> <li class="level1"><a href="#getting-started">Getting Started</a></li> <li class="level1"><a href="#licenses">Licenses</a></li> <li class="level1"><a href="#related-information">Related Information</a></li> <li class="level2"><a href="#overview">Overview</a></li> <li class="level2"><a href="#references">References</a></li> <li class="level2"><a href="#examples">Examples</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">Qt Positioning</h1> <span class="subtitle"></span> <!-- $$$qtpositioning-index.html-description --> <div class="descr"> <a name="details"></a> <p>The Qt Positioning API provides positioning information via QML and C++ interfaces.</p> <p>Currently the API is supported on <a href="../qtdoc/android-support.html">Android</a>, <a href="../qtdoc/ios-support.html">iOS</a>, <a href="../qtdoc/osx.html">macOS</a>, <a href="../qtdoc/linux.html">Linux</a> (using <a href="http://www.freedesktop.org/wiki/Software/GeoClue">GeoClue version 0.12.99</a>), <a href="../qtdoc/windows-support.html">Windows</a> (with GPS receivers exposed as a serial port providing NMEA sentences), and <a href="../qtdoc/winrt-support.html">WinRT</a> (using Windows.Devices.Geolocation). Note that the <a href="../qtdoc/winrt-support.html">WinRT</a> implementation can also be used in Win32 Desktop uses cases if the underlying platform is Windows 10 or later.</p> <a name="overview"></a> <h2 id="overview">Overview</h2> <p>The Qt Positioning API gives developers the ability to determine a position by using a variety of possible sources, including satellite, or wifi, or text file, and so on. That information can then be used to for example determine a position on a map. In addition satellite information can be retrieved and area based monitoring can be performed.</p> <a name="getting-started"></a> <h2 id="getting-started">Getting Started</h2> <p>To load the Qt Positioning module, add the following statement to your .qml files</p> <pre class="qml"> import QtPositioning 5.11 </pre> <p>For C++ projects include the header appropriate for the current use case, for example applications using routes may use</p> <pre class="cpp"> <span class="preprocessor">#include <QGeoCoordinate> </span> </pre> <p>The .pro file should have the <i>positioning</i> keyword added</p> <pre class="cpp"> QT <span class="operator">+</span><span class="operator">=</span> positioning </pre> <a name="licenses"></a> <h2 id="licenses">Licenses</h2> <p>Qt Positioning is available under commercial licenses from <a href="http://www.qt.io/about-us/">The Qt Company</a>. In addition, it is available under free software licenses. Since Qt 5.4, these free software licenses are <a href="http://www.gnu.org/licenses/lgpl-3.0.html">GNU Lesser General Public License, version 3</a>, or the <a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU General Public License, version 2</a>. See <a href="../qtdoc/licensing.html">Qt Licensing</a> for further details.</p> <a name="related-information"></a> <h2 id="related-information">Related Information</h2> <a name="overview"></a> <h3 >Overview</h3> <p>Positioning includes all the functionality necessary to find and work with geographic coordinates. It can use a variety of external sources of information, including GPS. This provides us with a coordinate and altitude for the device with additional features such as speed and direction. This provides the fundamental location information used in the API.</p> <a name="references"></a> <h3 >References</h3> <div class="table"><table class="generic"> <tr valign="top" class="odd"><td >Positioning introduction:</td><td ><a href="location-positioning-qml.html">for QML</a></td><td ><a href="location-positioning-cpp.html">for C++</a></td></tr> <tr valign="top" class="even"><td >API references:</td><td ><a href="qtpositioning-qmlmodule.html">for QML</a></td><td ><a href="qtpositioning-module.html">for C++</a></td></tr> <tr valign="top" class="odd"><td >Position plugins:</td><td ><a href="qtpositioning-plugins.html">Qt Positioning service plugins</a></td></tr> </table></div> <a name="examples"></a> <h3 >Examples</h3> <ul> <li><a href="qtpositioning-geoflickr-example.html">GeoFlickr (QML)</a></li> <li><a href="qtpositioning-logfilepositionsource-example.html">Log File Position Source (C++)</a></li> <li><a href="qtpositioning-satelliteinfo-example.html">SatelliteInfo (C++/QML)</a></li> <li><a href="qtpositioning-weatherinfo-example.html">Weather Info (C++/QML)</a></li> </ul> </div> <!-- @@@qtpositioning-index.html --> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.<br/> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br/> 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. </p> </div> </body> </html>