이 페이지에서

MapItemView QML Type

MapItemView는 모델에서 데이터를 가져와 지도에 표시하는 데 사용됩니다. 더 보기...

Import Statement: import QtLocation 6.12
Since: QtLocation 5.5
Inherits:

QtObject

속성

상세 설명

MapItemView는 모델의 MapItems를 Map에 채우는 데 사용됩니다. MapItemView 유형은 Map에 포함되었을 때만 의미가 있으며, 즉 독립적인 표시 형태는 없습니다.

사용 예

이 예제는 MapViewItem 객체를 사용하여 map 에 route 를 표시하는 방법을 보여줍니다:

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
        }
    }
}

속성 설명

add : Transition [since QtLocation 5.12]

이 속성은 뷰에 의해 생성된 지도 항목이 인스턴스화되어 지도에 추가될 때 적용되는 전환 효과를 저장합니다.

이 속성은 QtLocation 5.12에서 도입되었습니다.

autoFitViewport : bool

이 속성은 항목이 추가되거나 제거될 때 모든 지도 항목을 표시하도록 뷰포트의 이동 및 확대/축소를 자동으로 수행할지 여부를 제어합니다.

기본값은 false입니다.

delegate : Component

이 속성은 모델 내 각 항목이 어떻게 표시되어야 하는지를 정의하는 델리게이트를 포함합니다. 컴포넌트는 루트 객체로 MapItem에서 파생된 객체를 정확히 하나만 포함해야 합니다.

delegateModelAccess : enumeration [since 6.10]

이 속성은 델리게이트가 모델에 접근하는 방식을 결정합니다.

상수설명
DelegateModel.ReadOnly델리게이트가 컨텍스트 속성, ` model ` 객체 또는 필수 속성을 통해 모델에 쓰기 작업을 수행하는 것을 금지합니다.
DelegateModel.ReadWrite델리게이트가 컨텍스트 속성, ` model ` 개체 또는 필수 속성을 통해 모델에 쓰기 작업을 수행할 수 있도록 허용합니다.
DelegateModel.Qt5ReadWrite델리게이트가 model 객체 및 컨텍스트 속성을 통해 모델에 쓰기 작업을 수행할 수 있도록 허용하지만, 필수 속성을 통한 쓰기 작업은 허용하지 않습니다.

기본값은 DelegateModel.Qt5ReadWrite 입니다.

이 속성은 Qt 6.10에서 도입되었습니다.

Qt Quick 의 모델 및 뷰 #모델 데이터 변경항목도 참조하십시오 .

model : model

이 속성은 델리게이트에 의해 정의된 맵 항목을 생성하는 데 사용되는 데이터를 제공하는 모델을 포함합니다. QAbstractItemModel 기반의 모델만 지원됩니다.

remove : Transition [since QtLocation 5.12]

이 속성은 뷰에서 생성된 맵 항목이 제거될 때 적용되는 전환 효과를 저장합니다.

이 속성은 QtLocation 5.12에서 도입되었습니다.

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