Sophie

Sophie

distrib > Mageia > 7 > armv7hl > by-pkgid > 2c21526e2a037dc4eaceb3895021e482 > files > 54

qtlocation5-doc-5.12.6-1.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- maps.qdoc -->
  <title>Maps and Navigation (QML) | Qt Location 5.12.6</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 >Qt 5.12</td><td ><a href="qtlocation-index.html">Qt Location</a></td><td >Maps and Navigation (QML)</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtlocation-index.html">Qt 5.12.6 Reference Documentation</a></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="#maps">Maps</a></li>
<li class="level2"><a href="#displaying-maps">Displaying Maps</a></li>
<li class="level2"><a href="#putting-objects-on-a-map-map-overlay-objects">Putting Objects on a Map (Map Overlay Objects)</a></li>
<li class="level2"><a href="#model-view-design-with-map-overlay-objects">Model-View Design with Map Overlay Objects</a></li>
<li class="level2"><a href="#interaction-with-map-overlay-objects">Interaction with Map Overlay Objects</a></li>
<li class="level1"><a href="#geocoding-address-to-coordinate-and-vice-versa">Geocoding -- Address to Coordinate and Vice Versa</a></li>
<li class="level1"><a href="#routing-and-navigation">Routing and Navigation</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Maps and Navigation (QML)</h1>
<span class="subtitle"></span>
<!-- $$$location-maps-qml.html-description -->
<div class="descr"> <a name="details"></a>
<p><b>Maps and Navigation</b> provides QtQuick user interface types for displaying geographic information on a map, as well as allowing user interaction with map overlay objects and the display itself. It also contains utilities for geocoding (finding a geographic coordinate from a street address) and navigation (including driving and walking directions).</p>
<p>It builds upon the API concepts and types in the QML Positioning API. A more hands-on introduction of the Maps and Navigation types can be found in the <a href="qml-location5-maps.html">Maps and Navigation tutorial</a>.</p>
<a name="maps"></a>
<h2 id="maps">Maps</h2>
<a name="displaying-maps"></a>
<h3 id="displaying-maps">Displaying Maps</h3>
<p>Displaying a map is done using the <a href="qml-qtlocation-map.html">Map</a> QML types. The Map type supports user interaction through the <a href="qml-qtlocation-mapgesturearea.html">MapGestureArea</a> QML type. The Map object draws the map on-screen using OpenGL (ES), allowing for hardware-accelerated rendering where available.</p>
<p><b>Key Types</b></p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><a href="qml-qtlocation-plugin.html">Plugin</a></td><td >A location-based services plugin provides data including map data which is then displayed in a Map object.</td></tr>
<tr valign="top" class="even"><td ><a href="qml-qtlocation-map.html">Map</a></td><td >QtQuick item to display a map on-screen.</td></tr>
<tr valign="top" class="odd"><td ><a href="qml-qtlocation-mapgesturearea.html">MapGestureArea</a></td><td >Interaction helper for panning, flicking and pinch-to-zoom gesture on a Map.</td></tr>
</table></div>
<p>Note that the client must create a <a href="qml-qtlocation-plugin.html">Plugin</a> object prior to using a <a href="qml-qtlocation-map.html">Map</a> type in order to have access to map data to display.</p>
<a name="putting-objects-on-a-map-map-overlay-objects"></a>
<h3 id="putting-objects-on-a-map-map-overlay-objects">Putting Objects on a Map (Map Overlay Objects)</h3>
<p>Maps can also contain map overlay objects, which are used to display information on its surface. There is a set of basic pre-defined map overlay objects, as well as the ability to implement custom map overlay objects using the <a href="qml-qtlocation-mapquickitem.html">MapQuickItem</a> type, which can contain any standard QtQuick item.</p>
<p><b>Key Types</b></p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><a href="qml-qtlocation-mapcircle.html">MapCircle</a></td><td >A geographic circle (all points at a set distance from a center), optionally with a border.</td></tr>
<tr valign="top" class="even"><td ><a href="qml-qtlocation-maprectangle.html">MapRectangle</a></td><td >A rectangle whose top left and bottom right points are specified as coordinate types, optionally with a border.</td></tr>
<tr valign="top" class="odd"><td ><a href="qml-qtlocation-mappolygon.html">MapPolygon</a></td><td >A polygon made of an arbitrary list of coordinates.</td></tr>
<tr valign="top" class="even"><td ><a href="qml-qtlocation-mappolyline.html">MapPolyline</a></td><td >A polyline made of an arbitrary list of coordinates.</td></tr>
<tr valign="top" class="odd"><td ><a href="qml-qtlocation-mapquickitem.html">MapQuickItem</a></td><td >Turns any arbitrary QtQuick Item into a map overlay object. <a href="qml-qtlocation-mapquickitem.html">MapQuickItem</a> is an enabler for specifying custom map overlay objects.</td></tr>
</table></div>
<a name="model-view-design-with-map-overlay-objects"></a>
<h3 id="model-view-design-with-map-overlay-objects">Model-View Design with Map Overlay Objects</h3>
<p>To automatically generate map overlay objects based on the contents of a QtQuick model (for example a ListModel item), the <a href="qml-qtlocation-mapitemview.html">MapItemView</a> type is available. It accepts any map overlay object as its delegate, and can only be created within a <a href="qml-qtlocation-map.html">Map</a>.</p>
<p><b>Key Types</b></p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><a href="qml-qtlocation-mapitemview.html">MapItemView</a></td><td >Populates a Map with map overlay objects based on the data provided by a model.</td></tr>
</table></div>
<a name="interaction-with-map-overlay-objects"></a>
<h3 id="interaction-with-map-overlay-objects">Interaction with Map Overlay Objects</h3>
<p>Properties of map overlay objects that influence their appearance on the display can be changed at any time, and many can also be used in animations. Animating coordinate-based map overlay objects, such as <a href="qml-qtlocation-mappolygon.html">MapPolygon</a> and <a href="qml-qtlocation-mappolyline.html">MapPolyline</a>, is not yet available.</p>
<a name="geocoding-address-to-coordinate-and-vice-versa"></a>
<h2 id="geocoding-address-to-coordinate-and-vice-versa">Geocoding -- Address to Coordinate and Vice Versa</h2>
<p>Geocoding is the translation of geographic coordinates into addresses, or vice versa. Such a translation usually involves sending the source data to a server which then performs the translation and returns the results, although some location-based service provider <a href="qml-qtlocation-plugin.html">plugins</a> may be able to provide some geocoding functionality without sending data to a remote server. The availability and accuracy of the translation usually depends on the location or address being translated, as different areas of the Earth are mapped to varying degrees of accuracy.</p>
<p>A geocoding query in QML is performed using the <a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a> type. For an address-to-coordinate query, its <code>query</code> property may be set to either an Address object or a string containing the textual form of the address to search for. To perform the reverse, the same property can be set to a coordinate instead. Results are made available in the contents of the model.</p>
<p><b>Key Types</b></p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><a href="qml-qtlocation-plugin.html">Plugin</a></td><td >A location-based services plugin provides data including geocoding translation results which are exposed to clients via a <a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a>.</td></tr>
<tr valign="top" class="even"><td ><a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a></td><td >Queries the Plugin for geocoding translations and provides access to results via indexes in the model.</td></tr>
<tr valign="top" class="odd"><td >Address</td><td >Structured address for use in queries and results of geocoding.</td></tr>
</table></div>
<p>Note that the client must create a <a href="qml-qtlocation-plugin.html">Plugin</a> object prior to using a <a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a> object. This will enable access to geocoding translation services and thus data to display.</p>
<a name="routing-and-navigation"></a>
<h2 id="routing-and-navigation">Routing and Navigation</h2>
<p>Routing is the determination of a navigable path from one point to another on a map. Given a map that is aware of features that aid or hinder navigation, such as bridges, waterways and so on, a series of segments that make up the journey can be constructed. If these <a href="qml-qtlocation-routesegment.html">RouteSegment</a>s are simple then we can add navigation information at the connecting points, <a href="qml-qtlocation-routemaneuver.html">RouteManeuver</a>s, between the segments.</p>
<p><b>Key Types</b></p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><a href="qml-qtlocation-route.html">Route</a></td><td >The entire path to be navigated.</td></tr>
<tr valign="top" class="even"><td ><a href="qml-qtlocation-routesegment.html">RouteSegment</a></td><td >The individual components of a route.</td></tr>
<tr valign="top" class="odd"><td ><a href="qml-qtlocation-routemaneuver.html">RouteManeuver</a></td><td >The navigation information that joins segments.</td></tr>
<tr valign="top" class="even"><td ><a href="qml-qtlocation-routemodel.html">RouteModel</a></td><td >The means of making requests on the backend to supply route information.</td></tr>
</table></div>
</div>
<!-- @@@location-maps-qml.html -->
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 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>