/usr/share/qt5/doc/qtlocation/qml-qtlocation-mapquickitem.html is in qtlocation5-doc-html 5.2.1-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qdeclarativegeomapquickitem.cpp -->
<title>MapQuickItem | QtLocation 5.2</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
<div class="main">
<div class="main-rounded">
<div class="navigationbar">
<ul>
<li>Qt 5.2</li>
<li><a href="qtlocation-index.html">Qt Location</a></li>
<li><a href="qtlocation-qmlmodule.html">QML Types</a></li>
<li>MapQuickItem</li>
<li id="buildversion">
Qt 5.2.1 Reference Documentation</li>
</ul>
</div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#positioning-and-sizing">Positioning and Sizing</a></li>
<li class="level2"><a href="#interaction">Interaction</a></li>
<li class="level2"><a href="#performance">Performance</a></li>
<li class="level2"><a href="#limitations">Limitations</a></li>
<li class="level2"><a href="#example-usage">Example Usage</a></li>
</ul>
</div>
<h1 class="title">MapQuickItem</h1>
<span class="subtitle"></span>
<!-- $$$MapQuickItem-brief -->
<p>The MapQuickItem type displays an arbitrary Qt Quick object on a Map. <a href="#details">More...</a></p>
<!-- @@@MapQuickItem -->
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> </b><tt>import QtLocation 5.0</tt></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt Location 5.0</td></tr></table><ul>
<li><a href="qml-qtlocation-mapquickitem-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtlocation-mapquickitem.html#anchorPoint-prop">anchorPoint</a></b></b> : QPointF</li>
<li class="fn"><b><b><a href="qml-qtlocation-mapquickitem.html#coordinate-prop">coordinate</a></b></b> : coordinate</li>
<li class="fn"><b><b><a href="qml-qtlocation-mapquickitem.html#sourceItem-prop">sourceItem</a></b></b> : object</li>
<li class="fn"><b><b><a href="qml-qtlocation-mapquickitem.html#zoomLevel-prop">zoomLevel</a></b></b> : real</li>
</ul>
<!-- $$$MapQuickItem-description -->
<a name="details"></a>
<h2>Detailed Description</h2>
<p>The MapQuickItem type is used to place an arbitrary Qt Quick object on a Map at a specified location and size. Compared to floating an item above the Map, a MapQuickItem will follow the panning (and optionally, the zooming) of the Map as if it is on the Map surface.</p>
<p>The <a href="qml-qtlocation-mapquickitem.html#sourceItem-prop">sourceItem</a> property contains the Qt Quick item to be drawn, which can be any kind of visible type.</p>
<a name="positioning-and-sizing"></a>
<h3>Positioning and Sizing</h3>
<p>The positioning of the MapQuickItem on the Map is controlled by two properties: <a href="qml-qtlocation-mapquickitem.html#coordinate-prop">coordinate</a> and <a href="qml-qtlocation-mapquickitem.html#anchorPoint-prop">anchorPoint</a>. If only <a href="qml-qtlocation-mapquickitem.html#coordinate-prop">coordinate</a> is set, it specifies a longitude/latitude coordinate for the item to be placed at. The set coordinate will line up with the top-left corner of the contained item when shown on the screen.</p>
<p>The <a href="qml-qtlocation-mapquickitem.html#anchorPoint-prop">anchorPoint</a> property provides a way to line up the coordinate with other parts of the item than just the top-left corner, by setting a number of pixels the item will be offset by. A simple way to think about it is to note that the point given by <a href="qml-qtlocation-mapquickitem.html#anchorPoint-prop">anchorPoint</a> on the item itself is the point that will line up with the given <a href="qml-qtlocation-mapquickitem.html#coordinate-prop">coordinate</a> when displayed.</p>
<p>In addition to being anchored to the map, the MapQuickItem can optionally follow the scale of the map, and change size when the Map is zoomed in or zoomed out. This behaviour is controlled by the <a href="qml-qtlocation-mapquickitem.html#zoomLevel-prop">zoomLevel</a> property. The default behaviour if <a href="qml-qtlocation-mapquickitem.html#zoomLevel-prop">zoomLevel</a> is not set is for the item to be drawn "on the screen" rather than "on the map", so that its size remains the same regardless of the zoom level of the Map.</p>
<a name="interaction"></a>
<h3>Interaction</h3>
<p>MapQuickItem is different to the other map objects in that it can accept "normal" QtQuick mouse and touch interaction types as well as the <a href="qml-qtlocation-mapmousearea.html">MapMouseArea</a> and friends. For example, for a MapQuickItem, the following two situations are equivalent:</p>
<pre class="cpp">MapQuickItem {
sourceItem: Rectangle {
width: <span class="number">20</span>; height: <span class="number">20</span>
}
MapMouseArea {
onClicked: {
console<span class="operator">.</span>log(<span class="string">"clicked!"</span>);
}
}
}</pre>
<pre class="cpp">MapQuickItem {
sourceItem: Rectangle {
width: <span class="number">20</span>; height: <span class="number">20</span>
MouseArea {
onClicked: {
console<span class="operator">.</span>log(<span class="string">"clicked!"</span>);
}
}
}
}</pre>
<p>Note, however, that using a <a href="qml-qtlocation-mapmousearea.html">MapMouseArea</a> inside the <a href="qml-qtlocation-mapquickitem.html#sourceItem-prop">sourceItem</a> (in this case, inside the Rectangle object), is unsupported, and may not work as desired.</p>
<p>MouseAreas used inside a complex <a href="qml-qtlocation-mapquickitem.html#sourceItem-prop">sourceItem</a> can be used to create, for example, a "close" button within a speech bubble that can be clicked separately to the rest of the bubble, which would be impossible using <a href="qml-qtlocation-mapmousearea.html">MapMouseArea</a> alone.</p>
<a name="performance"></a>
<h3>Performance</h3>
<p>Performance of a MapQuickItem is normally in the same ballpark as the contained Qt Quick item alone. Overheads added amount to a translation and (possibly) scaling of the original item, as well as a transformation from longitude and latitude to screen position.</p>
<a name="limitations"></a>
<h3>Limitations</h3>
<p><b>Note: </b>Due to an implementation detail, items placed inside a MapQuickItem will have a <tt>parent</tt> item which is not the MapQuickItem. Refer to the MapQuickItem by its <tt>id</tt>, and avoid the use of <tt>anchor</tt> in the <tt>sourceItem</tt>.</p><a name="example-usage"></a>
<h3>Example Usage</h3>
<p>The following snippet shows a MapQuickItem containing an Image object, to display a Marker on the Map. This strategy is used to show the map markers in the MapViewer example.</p>
<pre class="qml"><span class="type">MapQuickItem</span> {
<span class="name">id</span>: <span class="name">marker</span>
<span class="name">anchorPoint</span>.x: <span class="name">image</span>.<span class="name">width</span><span class="operator">/</span><span class="number">4</span>
<span class="name">anchorPoint</span>.y: <span class="name">image</span>.<span class="name">height</span>
<span class="name">sourceItem</span>: <span class="name">Image</span> {
<span class="name">id</span>: <span class="name">image</span>
}
}</pre>
<p class="centerAlign"><img src="images/api-mapquickitem.png" alt="" /></p><!-- @@@MapQuickItem -->
<h2>Property Documentation</h2>
<!-- $$$anchorPoint -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="anchorPoint-prop"></a><span class="name">anchorPoint</span> : <span class="type">QPointF</span></p></td></tr></table></div><div class="qmldoc"><p>This property determines which point on the <a href="qml-qtlocation-mapquickitem.html#sourceItem-prop">sourceItem</a> that will be lined up with the coordinate on the map.</p>
</div></div><!-- @@@anchorPoint -->
<br/>
<!-- $$$coordinate -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="coordinate-prop"></a><span class="name">coordinate</span> : <span class="type">coordinate</span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the anchor coordinate of the <a href="qml-qtlocation-mapquickitem.html">MapQuickItem</a>. The point on the <a href="qml-qtlocation-mapquickitem.html#sourceItem-prop">sourceItem</a> that is specified by <a href="qml-qtlocation-mapquickitem.html#anchorPoint-prop">anchorPoint</a> is kept aligned with this coordinate when drawn on the map.</p>
<p>In the image below, there are 3 MapQuickItems that are identical except for the value of their <a href="qml-qtlocation-mapquickitem.html#anchorPoint-prop">anchorPoint</a> properties. The values of <a href="qml-qtlocation-mapquickitem.html#anchorPoint-prop">anchorPoint</a> for each are written on top of the item.</p>
<p class="centerAlign"><img src="images/api-mapquickitem-anchor.png" alt="" /></p></div></div><!-- @@@coordinate -->
<br/>
<!-- $$$sourceItem -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="sourceItem-prop"></a><span class="name">sourceItem</span> : <span class="type">object</span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the source item that will be drawn on the map.</p>
</div></div><!-- @@@sourceItem -->
<br/>
<!-- $$$zoomLevel -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="zoomLevel-prop"></a><span class="name">zoomLevel</span> : <span class="type">real</span></p></td></tr></table></div><div class="qmldoc"><p>This property controls the scaling behaviour of the contents of the <a href="qml-qtlocation-mapquickitem.html">MapQuickItem</a>. In particular, by setting this property it is possible to choose between objects that are drawn on the screen (and sized in screen pixels), and those drawn on the map surface (which change size with the zoom level of the map).</p>
<p>The default value for this property is 0.0, which corresponds to drawing the object on the screen surface. If set to another value, the object will be drawn on the map surface instead. The value (if not zero) specifies the zoomLevel at which the object will be visible at a scale of 1:1 (ie, where object pixels and screen pixels are the same). At zoom levels lower than this, the object will appear smaller, and at higher zoom levels, appear larger. This is in contrast to when this property is set to zero, where the object remains the same size on the screen at all zoom levels.</p>
</div></div><!-- @@@zoomLevel -->
<br/>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2013 Digia Plc and/or its
subsidiaries. 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> Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. </p>
</div>
</body>
</html>
|