/usr/share/qt5/doc/qtlocation/qml-qtlocation-map.html is in qtlocation5-doc-html 5.5.1-3ubuntu1.
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 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qdeclarativegeomap.cpp -->
<title>Map QML Type | Qt Location 5.5</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.5</li>
<li><a href="qtlocation-index.html">Qt Location</a></li>
<li><a href="qtlocation-qmlmodule.html">QML Types</a></li>
<li>Map QML Type</li>
<li id="buildversion">Qt 5.5.1 Reference Documentation</li>
</ul>
</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="#properties">Properties</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#methods">Methods</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#map-objects">Map Objects</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="#example-usage">Example Usage</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Map QML Type</h1>
<span class="subtitle"></span>
<!-- $$$Map-brief -->
<p>The Map type displays a map. <a href="#details">More...</a></p>
<!-- @@@Map -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QtLocation 5.3</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt Location 5.0</td></tr></table></div><ul>
<li><a href="qml-qtlocation-map-members.html">List of all members, including inherited members</a></li>
<li><a href="qml-qtlocation-map-obsolete.html">Obsolete members</a></li>
</ul>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtlocation-map.html#activeMapType-prop">activeMapType</a></b></b> : MapType</li>
<li class="fn"><b><b><a href="qml-qtlocation-map.html#center-prop">center</a></b></b> : coordinate</li>
<li class="fn"><b><b><a href="qml-qtlocation-map.html#error-prop">error</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtlocation-map.html#errorString-prop">errorString</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-qtlocation-map.html#gesture-prop">gesture</a></b></b> : MapGestureArea</li>
<li class="fn"><b><b><a href="qml-qtlocation-map.html#mapItems-prop">mapItems</a></b></b> : list<MapItem></li>
<li class="fn"><b><b><a href="qml-qtlocation-map.html#maximumZoomLevel-prop">maximumZoomLevel</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtlocation-map.html#minimumZoomLevel-prop">minimumZoomLevel</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtlocation-map.html#plugin-prop">plugin</a></b></b> : Plugin</li>
<li class="fn"><b><b><a href="qml-qtlocation-map.html#supportedMapTypes-prop">supportedMapTypes</a></b></b> : list<MapType></li>
<li class="fn"><b><b><a href="qml-qtlocation-map.html#visibleRegion-prop">visibleRegion</a></b></b> : geoshape</li>
<li class="fn"><b><b><a href="qml-qtlocation-map.html#zoomLevel-prop">zoomLevel</a></b></b> : real</li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtlocation-map.html#copyrightLinkActivated-signal">copyrightLinkActivated</a></b></b>(string <i> link</i>)</li>
</ul>
<a name="methods"></a>
<h2 id="methods">Methods</h2>
<ul>
<li class="fn">void <b><b><a href="qml-qtlocation-map.html#addMapItem-method">addMapItem</a></b></b>(MapItem <i> item</i>)</li>
<li class="fn">void <b><b><a href="qml-qtlocation-map.html#clearMapItems-method">clearMapItems</a></b></b>()</li>
<li class="fn">void <b><b><a href="qml-qtlocation-map.html#fitViewportToMapItems-method">fitViewportToMapItems</a></b></b>()</li>
<li class="fn">point <b><b><a href="qml-qtlocation-map.html#fromCoordinate-method">fromCoordinate</a></b></b>(coordinate <i> coordinate</i>)</li>
<li class="fn">void <b><b><a href="qml-qtlocation-map.html#pan-method">pan</a></b></b>(int <i> dx</i>, int <i> dy</i>)</li>
<li class="fn">void <b><b><a href="qml-qtlocation-map.html#prefetchData-method">prefetchData</a></b></b>()</li>
<li class="fn">void <b><b><a href="qml-qtlocation-map.html#removeMapItem-method">removeMapItem</a></b></b>(MapItem <i> item</i>)</li>
<li class="fn">coordinate <b><b><a href="qml-qtlocation-map.html#toCoordinate-method">toCoordinate</a></b></b>(QPointF <i> position</i>)</li>
</ul>
<!-- $$$Map-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p>The Map type is used to display a map or image of the Earth, with the capability to also display interactive objects tied to the map's surface.</p>
<p>There are a variety of different ways to visualize the Earth's surface in a 2-dimensional manner, but all of them involve some kind of projection: a mathematical relationship between the 3D coordinates (latitude, longitude and altitude) and 2D coordinates (X and Y in pixels) on the screen.</p>
<p>Different sources of map data can use different projections, and from the point of view of the Map type, we treat these as one replaceable unit: the Map plugin. A Map plugin consists of a data source, as well as all other details needed to display its data on-screen.</p>
<p>The current Map plugin in use is contained in the <a href="location-places-qml.html#plugin">plugin</a> property of the Map item. In order to display any image in a Map item, you will need to set this property. See the <a href="location-places-qml.html#plugin">Plugin</a> type for a description of how to retrieve an appropriate plugin for use.</p>
<p>The geographic region displayed in the Map item is referred to as its viewport, and this is defined by the properties <a href="qml-qtlocation-map.html#center-prop">center</a>, and <a href="qml-qtlocation-map.html#zoomLevel-prop">zoomLevel</a>. The <a href="qml-qtlocation-map.html#center-prop">center</a> property contains a coordinate specifying the center of the viewport, while <a href="qml-qtlocation-map.html#zoomLevel-prop">zoomLevel</a> controls the scale of the map. See each of these properties for further details about their values.</p>
<p>When the map is displayed, each possible geographic coordinate that is visible will map to some pixel X and Y coordinate on the screen. To perform conversions between these two, Map provides the <a href="qml-qtlocation-map.html#toCoordinate-method">toCoordinate</a> and <a href="qml-qtlocation-map.html#fromCoordinate-method">fromCoordinate</a> functions, which are of general utility.</p>
<a name="map-objects"></a>
<h3 >Map Objects</h3>
<p>Map related objects can be declared within the body of a Map object in Qt Quick and will automatically appear on the Map. To add objects programmatically, first be sure they are created with the Map as their parent (for example in an argument to Component::createObject), and then call the <a href="qml-qtlocation-map.html#addMapItem-method">addMapItem</a> method on the Map. A corresponding <a href="qml-qtlocation-map.html#removeMapItem-method">removeMapItem</a> method also exists to do the opposite and remove an object from the Map.</p>
<p>Moving Map objects around, resizing them or changing their shape normally does not involve any special interaction with Map itself -- changing these details about a map object will automatically update the display.</p>
<a name="interaction"></a>
<h3 >Interaction</h3>
<p>The Map type includes support for pinch and flick gestures to control zooming and panning. These are enabled by default, and available at any time by using the <a href="qml-qtlocation-map.html#gesture-prop">gesture</a> object. The actual GestureArea is constructed specially at startup and cannot be replaced or destroyed. Its properties can be altered, however, to control its behavior.</p>
<a name="performance"></a>
<h3 >Performance</h3>
<p>Maps are rendered using OpenGL (ES) and the Qt Scene Graph stack, and as a result perform quite well where GL accelerated hardware is available.</p>
<p>For "online" Map plugins, network bandwidth and latency can be major contributors to the user's perception of performance. Extensive caching is performed to mitigate this, but such mitigation is not always perfect. For "offline" plugins, the time spent retrieving the stored geographic data and rendering the basic map features can often play a dominant role. Some offline plugins may use hardware acceleration themselves to (partially) avert this.</p>
<p>In general, large and complex Map items such as polygons and polylines with large numbers of vertices can have an adverse effect on UI performance. Further, more detailed notes on this are in the documentation for each map item type.</p>
<a name="example-usage"></a>
<h3 >Example Usage</h3>
<p>The following snippet shows a simple Map and the necessary Plugin type to use it. The map is centered near Brisbane, Australia, zoomed out to the minimum zoom level, with gesture interaction enabled.</p>
<pre class="cpp">Plugin {
id: somePlugin
<span class="comment">// code here to choose the plugin as necessary</span>
}
Map {
id: map
plugin: somePlugin
center {
latitude: <span class="operator">-</span><span class="number">27</span>
longitude: <span class="number">153</span>
}
zoomLevel: map<span class="operator">.</span>minimumZoomLevel
gesture<span class="operator">.</span>enabled: <span class="keyword">true</span>
}</pre>
<p class="centerAlign"><img src="images/api-map.png" alt="" /></p><!-- @@@Map -->
<h2>Property Documentation</h2>
<!-- $$$activeMapType -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="activeMapType-prop"><td class="tblQmlPropNode"><p><a name="activeMapType-prop"></a><span class="name">activeMapType</span> : <span class="type"><a href="qml-qtlocation-maptype.html">MapType</a></span></p></td></tr></table></div></div><div class="qmldoc"><p>Access to the currently active <a href="qml-qtlocation-maptype.html">map type</a>.</p>
<p>This property can be set to change the active <a href="qml-qtlocation-maptype.html">map type</a>. See the <a href="qml-qtlocation-map.html#supportedMapTypes-prop">supportedMapTypes</a> property for possible values.</p>
<p><b>See also </b><a href="qml-qtlocation-maptype.html">MapType</a>.</p>
</div></div><!-- @@@activeMapType -->
<br/>
<!-- $$$center -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="center-prop"><td class="tblQmlPropNode"><p><a name="center-prop"></a><span class="name">center</span> : <span class="type">coordinate</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the coordinate which occupies the center of the mapping viewport. Invalid center coordinates are ignored.</p>
<p>The default value is an arbitrary valid coordinate.</p>
</div></div><!-- @@@center -->
<br/>
<!-- $$$error -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="error-prop"><td class="tblQmlPropNode"><p><a name="error-prop"></a><span class="name">error</span> : <span class="type">enumeration</span></p></td></tr></table></div></div><div class="qmldoc"><p>This read-only property holds the last occurred mapping service provider error.</p>
<ul>
<li>Map.NoError - No error has occurred.</li>
<li>Map.NotSupportedError -The plugin does not support mapping functionality.</li>
<li>Map.UnknownParameterError -The plugin did not recognize one of the parameters it was given.</li>
<li>Map.MissingRequiredParameterError - The plugin did not find one of the parameters it was expecting.</li>
<li>Map.ConnectionError - The plugin could not connect to its backend service or database.</li>
</ul>
<p><b>See also </b><a href="qgeoserviceprovider.html#Error-enum">QGeoServiceProvider::Error</a>.</p>
</div></div><!-- @@@error -->
<br/>
<!-- $$$errorString -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="errorString-prop"><td class="tblQmlPropNode"><p><a name="errorString-prop"></a><span class="name">errorString</span> : <span class="type">string</span></p></td></tr></table></div></div><div class="qmldoc"><p>This read-only property holds the textual presentation of the latest mapping provider error. If no error has occurred, an empty string is returned.</p>
<p>An empty string may also be returned if an error occurred which has no associated textual representation.</p>
<p><b>See also </b><a href="qgeoserviceprovider.html#errorString">QGeoServiceProvider::errorString()</a>.</p>
</div></div><!-- @@@errorString -->
<br/>
<!-- $$$gesture -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="gesture-prop"><td class="tblQmlPropNode"><p><a name="gesture-prop"></a><span class="name">gesture</span> : <span class="type"><a href="qml-qtlocation-mapgesturearea.html">MapGestureArea</a></span></p></td></tr></table></div></div><div class="qmldoc"><p>Contains the <a href="qml-qtlocation-mapgesturearea.html">MapGestureArea</a> created with the Map. This covers pan, flick and pinch gestures. Use <code>gesture.enabled: true</code> to enable basic gestures, or see <a href="qml-qtlocation-mapgesturearea.html">MapGestureArea</a> for further details.</p>
</div></div><!-- @@@gesture -->
<br/>
<!-- $$$mapItems -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="mapItems-prop"><td class="tblQmlPropNode"><p><a name="mapItems-prop"></a><span class="name">mapItems</span> : <span class="type">list</span><<span class="type">MapItem</span>></p></td></tr></table></div></div><div class="qmldoc"><p>Returns the list of all map items in no particular order. These items include items that were declared statically as part of the type declaration, as well as dynamical items (<a href="qml-qtlocation-map.html#addMapItem-method">addMapItem</a>, <a href="qml-qtlocation-mapitemview.html">MapItemView</a>).</p>
<p><b>See also </b><a href="qml-qtlocation-map.html#addMapItem-method">addMapItem</a>, <a href="qml-qtlocation-map.html#removeMapItem-method">removeMapItem</a>, and <a href="qml-qtlocation-map.html#clearMapItems-method">clearMapItems</a>.</p>
</div></div><!-- @@@mapItems -->
<br/>
<!-- $$$maximumZoomLevel -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="maximumZoomLevel-prop"><td class="tblQmlPropNode"><p><a name="maximumZoomLevel-prop"></a><span class="name">maximumZoomLevel</span> : <span class="type">real</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the maximum valid zoom level for the map.</p>
<p>The maximum zoom level is defined by the <a href="location-places-qml.html#plugin">plugin</a> used. If a plugin supporting mapping is not set, -1.0 is returned.</p>
</div></div><!-- @@@maximumZoomLevel -->
<br/>
<!-- $$$minimumZoomLevel -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="minimumZoomLevel-prop"><td class="tblQmlPropNode"><p><a name="minimumZoomLevel-prop"></a><span class="name">minimumZoomLevel</span> : <span class="type">real</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the minimum valid zoom level for the map.</p>
<p>The minimum zoom level is defined by the <a href="location-places-qml.html#plugin">plugin</a> used. If a plugin supporting mapping is not set, -1.0 is returned.</p>
</div></div><!-- @@@minimumZoomLevel -->
<br/>
<!-- $$$plugin -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="plugin-prop"><td class="tblQmlPropNode"><p><a name="plugin-prop"></a><span class="name">plugin</span> : <span class="type"><a href="qml-qtlocation-plugin.html">Plugin</a></span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the plugin which provides the mapping functionality.</p>
<p>This is a write-once property. Once the map has a plugin associated with it, any attempted modifications of the plugin will be ignored.</p>
</div></div><!-- @@@plugin -->
<br/>
<!-- $$$supportedMapTypes -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="supportedMapTypes-prop"><td class="tblQmlPropNode"><p><a name="supportedMapTypes-prop"></a><span class="name">supportedMapTypes</span> : <span class="type">list</span><<span class="type"><a href="qml-qtlocation-maptype.html">MapType</a></span>></p></td></tr></table></div></div><div class="qmldoc"><p>This read-only property holds the set of <a href="qml-qtlocation-maptype.html">map types</a> supported by this map.</p>
<p><b>See also </b><a href="qml-qtlocation-map.html#activeMapType-prop">activeMapType</a>.</p>
</div></div><!-- @@@supportedMapTypes -->
<br/>
<!-- $$$visibleRegion -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="visibleRegion-prop"><td class="tblQmlPropNode"><p><a name="visibleRegion-prop"></a><span class="name">visibleRegion</span> : <span class="type">geoshape</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the region which occupies the viewport of the map. The camera is positioned in the center of the shape, and at the largest integral zoom level possible which allows the whole shape to be visible on the screen. This implies that reading this property back shortly after having been set the returned area is equal or larger than the set area.</p>
<p>Setting this property implicitly changes the <a href="qml-qtlocation-map.html#center-prop">center</a> and <a href="qml-qtlocation-map.html#zoomLevel-prop">zoomLevel</a> of the map. Any previously set value to those properties will be overridden.</p>
<p>This property does not provide any change notifications.</p>
<p>This QML property was introduced in Qt 5.5.</p>
</div></div><!-- @@@visibleRegion -->
<br/>
<!-- $$$zoomLevel -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="zoomLevel-prop"><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><div class="qmldoc"><p>This property holds the zoom level for the map.</p>
<p>Larger values for the zoom level provide more detail. Zoom levels are always non-negative. The default value is 8.0.</p>
</div></div><!-- @@@zoomLevel -->
<br/>
<h2>Signal Documentation</h2>
<!-- $$$copyrightLinkActivated -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="copyrightLinkActivated-signal"><td class="tblQmlFuncNode"><p><a name="copyrightLinkActivated-signal"></a><span class="name">copyrightLinkActivated</span>(<span class="type">string</span><i> link</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>This signal is emitted when the user clicks on a <i>link</i> in the copyright notice. The application should open the link in a browser or display its contents to the user.</p>
</div></div><!-- @@@copyrightLinkActivated -->
<br/>
<h2>Method Documentation</h2>
<!-- $$$addMapItem -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="addMapItem-method"><td class="tblQmlFuncNode"><p><a name="addMapItem-method"></a><span class="type">void</span> <span class="name">addMapItem</span>(<span class="type">MapItem</span><i> item</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Adds the given <i>item</i> to the Map (for example <a href="qml-qtlocation-mapquickitem.html">MapQuickItem</a>, <a href="qml-qtlocation-mapcircle.html">MapCircle</a>). If the object already is on the Map, it will not be added again.</p>
<p>As an example, consider the case where you have a <a href="qml-qtlocation-mapcircle.html">MapCircle</a> representing your current position:</p>
<pre class="qml">import QtQuick 2.0
import QtPositioning 5.5
import QtLocation 5.5
<span class="type">PositionSource</span> {
<span class="name">id</span>: <span class="name">positionSource</span>
}
<span class="type"><a href="qml-qtlocation-map.html">Map</a></span> {
<span class="name">id</span>: <span class="name">map</span>
property <span class="type"><a href="qml-qtlocation-mapcircle.html">MapCircle</a></span> <span class="name">circle</span>
<span class="name">Component</span>.onCompleted: {
<span class="name">circle</span> <span class="operator">=</span> <span class="name">Qt</span>.<span class="name">createQmlObject</span>(<span class="string">'import QtLocation 5.3; MapCircle {}'</span>, <span class="name">page</span>)
<span class="name">circle</span>.<span class="name">center</span> <span class="operator">=</span> <span class="name">positionSource</span>.<span class="name">position</span>.<span class="name">coordinate</span>
<span class="name">circle</span>.<span class="name">radius</span> <span class="operator">=</span> <span class="number">5000.0</span>
<span class="name">circle</span>.<span class="name">color</span> <span class="operator">=</span> <span class="string">'green'</span>
<span class="name">circle</span>.<span class="name">border</span>.<span class="name">width</span> <span class="operator">=</span> <span class="number">3</span>
<span class="name">map</span>.<span class="name">addMapItem</span>(<span class="name">circle</span>)
}
}</pre>
<p><b>Note: </b>MapItemViews cannot be added with this method.</p><p><b>See also </b><a href="qml-qtlocation-map.html#mapItems-prop">mapItems</a>, <a href="qml-qtlocation-map.html#removeMapItem-method">removeMapItem</a>, and <a href="qml-qtlocation-map.html#clearMapItems-method">clearMapItems</a>.</p>
</div></div><!-- @@@addMapItem -->
<br/>
<!-- $$$clearMapItems -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="clearMapItems-method"><td class="tblQmlFuncNode"><p><a name="clearMapItems-method"></a><span class="type">void</span> <span class="name">clearMapItems</span>()</p></td></tr></table></div></div><div class="qmldoc"><p>Removes all items from the map.</p>
<p><b>See also </b><a href="qml-qtlocation-map.html#mapItems-prop">mapItems</a>, <a href="qml-qtlocation-map.html#addMapItem-method">addMapItem</a>, and <a href="qml-qtlocation-map.html#removeMapItem-method">removeMapItem</a>.</p>
</div></div><!-- @@@clearMapItems -->
<br/>
<!-- $$$fitViewportToMapItems -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="fitViewportToMapItems-method"><td class="tblQmlFuncNode"><p><a name="fitViewportToMapItems-method"></a><span class="type">void</span> <span class="name">fitViewportToMapItems</span>()</p></td></tr></table></div></div><div class="qmldoc"><p>Fits the current viewport to the boundary of all map items. The camera is positioned in the center of the map items, and at the largest integral zoom level possible which allows all map items to be visible on screen</p>
</div></div><!-- @@@fitViewportToMapItems -->
<br/>
<!-- $$$fromCoordinate -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="fromCoordinate-method"><td class="tblQmlFuncNode"><p><a name="fromCoordinate-method"></a><span class="type">point</span> <span class="name">fromCoordinate</span>(<span class="type">coordinate</span><i> coordinate</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Returns the position relative to the map item which corresponds to the <i>coordinate</i>.</p>
<p>Returns an invalid <a href="../qtcore/qpointf.html">QPointF</a> if <i>coordinate</i> is not within the current viewport.</p>
</div></div><!-- @@@fromCoordinate -->
<br/>
<!-- $$$pan -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="pan-method"><td class="tblQmlFuncNode"><p><a name="pan-method"></a><span class="type">void</span> <span class="name">pan</span>(<span class="type">int</span><i> dx</i>, <span class="type">int</span><i> dy</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Starts panning the map by <i>dx</i> pixels along the x-axis and by <i>dy</i> pixels along the y-axis.</p>
<p>Positive values for <i>dx</i> move the map right, negative values left. Positive values for <i>dy</i> move the map down, negative values up.</p>
<p>During panning the <a href="qml-qtlocation-map.html#center-prop">center</a>, and <a href="qml-qtlocation-map.html#zoomLevel-prop">zoomLevel</a> may change.</p>
</div></div><!-- @@@pan -->
<br/>
<!-- $$$prefetchData -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="prefetchData-method"><td class="tblQmlFuncNode"><p><a name="prefetchData-method"></a><span class="type">void</span> <span class="name">prefetchData</span>()</p></td></tr></table></div></div><div class="qmldoc"><p>Optional hint that allows the map to prefetch during this idle period</p>
</div></div><!-- @@@prefetchData -->
<br/>
<!-- $$$removeMapItem -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="removeMapItem-method"><td class="tblQmlFuncNode"><p><a name="removeMapItem-method"></a><span class="type">void</span> <span class="name">removeMapItem</span>(<span class="type">MapItem</span><i> item</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Removes the given <i>item</i> from the Map (for example <a href="qml-qtlocation-mapquickitem.html">MapQuickItem</a>, <a href="qml-qtlocation-mapcircle.html">MapCircle</a>). If the MapItem does not exist or was not previously added to the map, the method does nothing.</p>
<p><b>See also </b><a href="qml-qtlocation-map.html#mapItems-prop">mapItems</a>, <a href="qml-qtlocation-map.html#addMapItem-method">addMapItem</a>, and <a href="qml-qtlocation-map.html#clearMapItems-method">clearMapItems</a>.</p>
</div></div><!-- @@@removeMapItem -->
<br/>
<!-- $$$toCoordinate -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="toCoordinate-method"><td class="tblQmlFuncNode"><p><a name="toCoordinate-method"></a><span class="type">coordinate</span> <span class="name">toCoordinate</span>(<span class="type"><a href="../qtcore/qpointf.html">QPointF</a></span><i> position</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Returns the coordinate which corresponds to the <i>position</i> relative to the map item.</p>
<p>Returns an invalid coordinate if <i>position</i> is not within the current viewport.</p>
</div></div><!-- @@@toCoordinate -->
<br/>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2015 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>
|