Qt Location 아이템 오버레이 플러그인
개요
이 지리적 서비스 플러그인은 빈 지도만 제공하는 특수 플러그인입니다. 이 플러그인은 서비스를 제공하지 않으며 Map 요소에 추가된 지도 항목만 표시해야 하는 경우에 사용하기 위한 것입니다.
아이템 오버레이 지오 서비스 플러그인은 플러그인 키 "itemsoverlay"를 사용하여 로드할 수 있습니다.
사용 예
다음 코드 조각은 이 플러그인을 사용하는 맵을 오버레이로 추가하여 앤티 앨리어싱 맵 항목을 표시하는 방법을 보여줍니다. 이러한 오버레이 맵을 투명하게 표시하려면 예시에서와 같이 색상을 투명과 같이 투명한 색으로 설정해야 합니다.
Window { id: win visible: true width: 640 height: 640 Map { id: mapBase gesture.enabled: true anchors.fill: parent plugin: Plugin { name: "osm" } center: QtPositioning.coordinate(45,10) zoomLevel: 4 z: parent.z + 1 } Map { id: mapOverlay anchors.fill: parent plugin: Plugin { name: "itemsoverlay" } gesture.enabled: false center: mapBase.center color: 'transparent' // Necessary to make this map transparent minimumFieldOfView: mapBase.minimumFieldOfView maximumFieldOfView: mapBase.maximumFieldOfView minimumTilt: mapBase.minimumTilt maximumTilt: mapBase.maximumTilt minimumZoomLevel: mapBase.minimumZoomLevel maximumZoomLevel: mapBase.maximumZoomLevel zoomLevel: mapBase.zoomLevel tilt: mapBase.tilt; bearing: mapBase.bearing fieldOfView: mapBase.fieldOfView z: mapBase.z + 1 MapCircle { id: circle center: QtPositioning.coordinate(44, 10) radius: 200000 border.width: 5 MouseArea { anchors.fill: parent drag.target: parent } } // The code below enables SSAA layer.enabled: true layer.smooth: true property int w : mapOverlay.width property int h : mapOverlay.height property int pr: Screen.devicePixelRatio layer.textureSize: Qt.size(w * 2 * pr, h * 2 * pr) } }
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. 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.