routeSegment QML Type

routeSegment 型は、Route のセグメントを表します。詳細...

Import Statement: import QtLocation 6.8
Since: QtLocation 5.5

プロパティ

詳細説明

routeSegment のインスタンスは、ルートセグメントの物理的なレイアウト、ルートの長さ、ルートセグメント を横断するのに必要な推定時間、およびオプションでルートセグメントの終端に関連付けられたrouteManeuvers に関する情報を持ちます。

routeSegment のインスタンスは、ルーティンググラフのエッジと考えることができます。routeManeuver インスタンスは、グラフの頂点に付けられたオプションのラベルです。

Route オブジェクトを取得する主な手段は、RouteModel 経由の Routes である。

次の QML スニペットは、ルートセグメントに関する情報を表示する方法を示しています:

import QtQuick
import QtPositioning
import QtLocation

Text {
    text: "Segment distance " + routeSegment.distance + " meters, " + routeSegment.path.length + " points."
}

プロパティ Documentation

distance : real

読み出し専用プロパティで、ルートのこの区間がカバーする距離をメートル単位で保持する。


maneuver : RouteManeuver

このルートセグメントのマヌーバを保持する読み取り専用プロパティ。

このルートセグメントの終点に情報が添付されていない場合、無効なマニューバを返します。


path : list<coordinate>

このセグメントの地理座標を保持する読み取り専用プロパティ。座標は、ルートのこのセグメントを旅行する人が通過する順番にリストされています。

個々のセグメントにアクセスするには、標準のリストアクセサを使用します:path.length' はオブジェクトの数を表し、 'path[index starting from zero]' は実際のオブジェクトを表します。

QtPositioning::coordinateも参照してください


travelTime : int

読み込み専用のプロパティで、このセグメントを通過するのにかかる時間の目安を秒単位で保持します。


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