Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
itemsoverlay.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2017 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page location-plugin-itemsoverlay.html
6
\title Qt Location Items Overlay Plugin
7
\ingroup QtLocation-plugins
8
9
\brief Provides an empty map intended to be used as background for an overlay layers for map items.
10
11
\section1 Overview
12
13
This geo services plugin is a special plugin providing only an empty map.
14
This plugin provides no services, and is intended to be used in those cases where a \l Map element should
15
only show the added map items.
16
17
The Items Overlay geo services plugin can be loaded by using the plugin key "itemsoverlay".
18
19
\section1 Example usage
20
21
The following snippet shows how a Map using this plugin can be added as an overlay to display
22
anti-aliased map items.
23
Note that for such an overlay Map to be transparent, it is also necessary to set its color to
24
a transparent one, such as \b transparent, like in the example.
25
26
\qml
27
Window {
28
id: win
29
visible: true
30
width: 640
31
height: 640
32
33
Map {
34
id: mapBase
35
anchors.fill: parent
36
plugin: Plugin { name: "osm" }
37
center: QtPositioning.coordinate(45,10)
38
zoomLevel: 4
39
z: parent.z + 1
40
}
41
42
Map {
43
id: mapOverlay
44
anchors.fill: parent
45
plugin: Plugin { name: "itemsoverlay" }
46
center: mapBase.center
47
color: 'transparent' // Necessary to make this map transparent
48
minimumFieldOfView: mapBase.minimumFieldOfView
49
maximumFieldOfView: mapBase.maximumFieldOfView
50
minimumTilt: mapBase.minimumTilt
51
maximumTilt: mapBase.maximumTilt
52
minimumZoomLevel: mapBase.minimumZoomLevel
53
maximumZoomLevel: mapBase.maximumZoomLevel
54
zoomLevel: mapBase.zoomLevel
55
tilt: mapBase.tilt;
56
bearing: mapBase.bearing
57
fieldOfView: mapBase.fieldOfView
58
z: mapBase.z + 1
59
60
MapCircle {
61
id: circle
62
center: QtPositioning.coordinate(44, 10)
63
radius: 200000
64
border.width: 5
65
66
MouseArea {
67
anchors.fill: parent
68
drag.target: parent
69
}
70
}
71
72
// The code below enables SSAA
73
layer.enabled: true
74
layer.smooth: true
75
property int w : mapOverlay.width
76
property int h : mapOverlay.height
77
property int pr: Screen.devicePixelRatio
78
layer.textureSize: Qt.size(w * 2 * pr, h * 2 * pr)
79
}
80
}
81
\endqml
82
83
*/
qtlocation
src
location
doc
src
plugins
itemsoverlay.qdoc
Generated on
for Qt by
1.14.0