Location QML Type
Location型は位置情報を保持する。詳細...
Import Statement: | import QtPositioning |
プロパティ
- address : Address
- boundingShape : geoshape
(since QtPositioning 6.2)
- coordinate : coordinate
- location : QGeoLocation
詳細説明
ロケーションタイプは、人間的な意味での地理的な「場所」を表す。これは、特定のcoordinate 、address 、bounding shape から構成される。bounding shape は、このロケーションを表示するときに表示する推奨地域を表す。
Location型は、GeocodeModel のような検索モデルのコンテンツとして最も一般的に見られる。GeocodeModel が、与えられたクエリに対して見つかった場所のリストを返すとき、Locationオブジェクトとしてこれらを表現する。
使用例
以下の例では、単純なLocationオブジェクトを宣言している:
Location { coordinate { latitude: -27.3 longitude: 153.1 } address: Address { ... } }
プロパティ Documentation
address : Address |
このプロパティは、ロケーションの住所を保持する。
boundingShape : geoshape |
このプロパティは、その場所を表示するときに使用する推奨地域を保持する。例えば、ある建物の位置は、その建物を中心とした領域を持つかもしれないが、その領域は周囲の地理的コンテキストを表示するのに十分な大きさである。
注: このプロパティの changed() シグナルは、現在、オブジェクト全体が変更された場合にのみ発信され、オブジェクトの内容だけが変更された場合には発信されません。
注意 : このプロパティは Qt6 で boundingBox プロパティの代わりに導入されました。このプロパティは、georectangle の代わりにgeoshape を返します。QGeoShape::boundingGeoRectangle() を使用して、シェイプのバウンディングgeorectangle を取得します。
返された図形を特定の型に変換する必要がある場合は、geoshape のtype
プロパティと、QtPositioning のQtPositioning.shapeToRectangle() のような便利なメソッドを使用します。
このプロパティは、QtPositioning 6.2 で導入されました。
coordinate : coordinate |
このプロパティは、場所の正確な地理座標を保持し、場所の緯度、経度、高度を取得するために使用できます。
注意: 現在、このプロパティの changed() シグナルは、オブジェクト全体が変更された場合にのみ発信され、オブジェクトの内容だけが変更された場合には発信されません。
location : QGeoLocation |
このプロパティを使った C++ と QML のインターフェースについては、"C++ と QML コードのインターフェース"を参照してください。
注意: このプロパティは地理位置情報全体を更新するため、このプロパティを使用すると、他のすべてのプロパティのバインディングが壊れます。
© 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.