MapRoute QML Type

MapRoute 유형은 지도에 경로를 표시합니다. 더 보기...

Import Statement: import QtLocation 6.8
Since: QtLocation 5.0

속성

상세 설명

MapRoute 유형은 RouteModel 또는 다른 경로를 통해 얻은 경로를 경로의 경로를 따라 폴리라인으로 맵에 표시합니다.

MapRoute는 실제로는 MapPolyline 이지만 coordinates 에 직접 경로를 지정하는 대신 route 속성을 사용하여 경로를 지정합니다.

기본적으로 경로는 1픽셀 두께의 검은색 선으로 표시됩니다. line.widthline.color 속성을 사용하여 변경할 수 있습니다.

사용 예

다음은 maproute 를 그리는 방법입니다:

import QtQuick
import QtPositioning
import QtLocation

Map {
    RouteModel {
        id: routeModel
    }

    MapItemView {
        model: routeModel
        delegate: routeDelegate
    }

    Component {
        id: routeDelegate

        MapRoute {
            route: routeData
            line.color: "blue"
            line.width: 5
            smooth: true
            opacity: 0.8
        }
    }
}

속성 문서

line group

line.color : color

line.width : int

이 속성은 선 속성 그룹의 일부입니다. 선 속성 그룹은 선을 그리는 데 사용되는 너비와 색상을 보유합니다.

너비는 픽셀 단위이며 맵의 확대/축소 수준과 무관합니다. 기본값은 너비가 1픽셀인 검은색 테두리에 해당합니다.

선이 없는 경우 너비 0 또는 투명한 색상을 사용합니다.


route : Route

이 속성은 하나의 지리적 경로를 나타내는 데 사용할 수 있는 그려질 경로를 보유합니다.


© 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.