QGeoPath Class
The QGeoPath class defines a geographic path. More...
| Header: | #include <QGeoPath> |
| qmake: | QT += positioning |
| Since: | Qt 5.9 |
| Inherits: | QGeoShape |
This class was introduced in Qt 5.9.
Properties
Public Functions
| void | setVariantPath(const QVariantList &path) |
| void | setWidth(const qreal &width) |
| QVariantList | variantPath() const |
| qreal | width() const |
Detailed Description
The path is defined by an ordered list of QGeoCoordinates.
Each two adjacent elements in the path are intended to be connected together by the shortest line segment of constant bearing passing through both elements. This type of connection can cross the dateline in the longitudinal direction, but never crosses the poles.
This is relevant for the calculation of the bounding box returned by QGeoShape::boundingGeoRectangle() for this shape, which will have the latitude of the top left corner set to the maximum latitude in the path point set. Similarly, the latitude of the bottom right corner will be the minimum latitude in the path point set.
This class is a Q_GADGET. It can be directly used from C++ and QML.
A QGeoPath is both invalid and empty if it contains no coordinate.
Note: A default constructed QGeoPath is both invalid and empty as it does not contain any coordinates.
Property Documentation
path : QVariantList
This property holds the list of coordinates for the geo path.
Note: The coordinates cannot be processed in place. To change the value of this property, retrieve the complete list of coordinates, process them, and assign the new value to the property.
Access functions:
| QVariantList | variantPath() const |
| void | setVariantPath(const QVariantList &path) |
width : qreal
This property holds the width of the path in meters.
Access functions:
| qreal | width() const |
| void | setWidth(const qreal &width) |