MapItemView QML Type

MapItemViewはモデルからMapに入力するために使われる。詳細...

Import Statement: import QtLocation 6.8
Since: QtLocation 5.5

プロパティ

詳細説明

MapItemViewはモデルからMapItemsをMapに入力するために使用される。MapItemViewタイプは、Mapに含まれる場合にのみ意味を持ち、独立したプレゼンテーションを持っていないことを意味します。

使用例

この例では、maproute を表示するために MapViewItem オブジェクトを使用する方法を示します:

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

このプロパティは、モデル内の各アイテムの表示方法を定義するデリゲートを保持します。Component は、ルートオブジェクトとして正確に 1 つの MapItem 派生オブジェクトを含んでいる必要があります。


model : model

このプロパティは、デリゲートによって定義されたマップアイテムの作成に使用されるデータを提供するモデルを保持します。QAbstractItemModel ベースのモデルのみがサポートされます。


remove : Transition [since QtLocation 5.12]

このプロパティは、ビューによって作成されたマップアイテムが削除されるときに適用されるトランジションを保持します。

このプロパティは QtLocation 5.12 で導入されました。


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