QGeoRoute Class

QGeoRoute 클래스는 두 지점 사이의 경로를 나타냅니다. 더 보기...

Header: #include <QGeoRoute>
qmake: QT += location

속성

공개 기능

QGeoRoute()
QGeoRoute(const QGeoRoute &other)
~QGeoRoute()
QGeoRectangle bounds() const
qreal distance() const
QVariantMap extendedAttributes() const
QGeoRouteSegment firstRouteSegment() const
int legIndex() const
QGeoRoute overallRoute() const
QList<QGeoCoordinate> path() const
QString routeId() const
QList<QGeoRoute> routeLegs() const
QList<QGeoRouteSegment> segments() const
qsizetype segmentsCount() const
void setFirstRouteSegment(const QGeoRouteSegment &routeSegment)
void setPath(const QList<QGeoCoordinate> &path)
void setTravelMode(QGeoRouteRequest::TravelMode mode)
QGeoRouteRequest::TravelMode travelMode() const
int travelTime() const
QGeoRoute &operator=(const QGeoRoute &other)

보호된 기능

QExplicitlySharedDataPointer<QGeoRoutePrivate> &d()
bool operator!=(const QGeoRoute &lhs, const QGeoRoute &rhs)
bool operator==(const QGeoRoute &lhs, const QGeoRoute &rhs)

상세 설명

QGeoRoute 객체에는 경로의 길이, 경로의 예상 이동 시간, 지도에 경로의 기본 이미지를 렌더링하기에 충분한 정보 등 경로에 대한 높은 수준의 정보가 포함되어 있습니다.

QGeoRoute 객체에는 경로의 하위 섹션을 더 자세히 설명하는 QGeoRouteSegment 객체 목록도 포함되어 있습니다.

라우팅 정보는 일반적으로 QGeoRoutingManager::calculateRoute()를 사용하여 요청되며, ()는 QGeoRouteReply 인스턴스를 반환합니다. 작업이 성공적으로 완료되면 QGeoRouteReply::routes()를 사용하여 라우팅 정보에 액세스할 수 있습니다.

QGeoRoutingManager도 참조하세요 .

속성 문서

[read-only] bounds : const QGeoRectangle

이 속성은 전체 경로를 포함하는 바운딩 박스를 보유합니다.

함수에 액세스합니다:

QGeoRectangle bounds() const

[read-only] distance : const qreal

이 속성은 이 경로가 커버하는 거리(미터)를 저장합니다.

액세스 함수:

qreal distance() const

[read-only] extendedAttributes : const QVariantMap

이 속성은 이 경로와 관련된 확장 속성을 보유합니다.

액세스 함수:

QVariantMap extendedAttributes() const

[read-only] legIndex : const int

이 속성은 이 경로의 레그 인덱스를 보유합니다.

QGeoRoute::routeLegs 목록에 포함된 레그의 인덱스는 다음 레그를 찾는 데 사용할 수 있습니다.

함수 액세스:

int legIndex() const

[read-only] overallRoute : const QGeoRoute

이 속성은 이 경로 구간을 포함하는 경로를 보유합니다.

이 경로가 전체 경로 내의 레그가 아닌 경우 이 속성은 빈 경로를 보유합니다.

액세스 함수:

QGeoRoute overallRoute() const

path : QList<QGeoCoordinate>

이 속성은 경로의 기하학적 모양을 보유합니다.

좌표는 경로의 이 구간을 따라 이동하는 사람이 통과하는 순서대로 나열되어야 합니다.

액세스 함수:

QList<QGeoCoordinate> path() const
void setPath(const QList<QGeoCoordinate> &path)

[read-only] routeId : const QString

이 속성은 이 경로의 식별자를 보유합니다.

경로 업데이트를 지원하는 서비스 제공업체는 일반적으로 경로에 식별자를 할당합니다. 이 경로가 이러한 서비스 제공업체에서 제공된 경로인 경우 식별자를 변경하면 경로 업데이트가 작동하지 않을 수 있습니다.

기능 액세스:

QString routeId() const

[read-only] routeLegs : const QList<QGeoRoute>

이 속성은 다중 경유지 경로에 대한 legs 경로를 보유합니다.

액세스 함수:

QList<QGeoRoute> routeLegs() const

[read-only] segments : const QList<QGeoRouteSegment>

이 속성은 이 경로의 QGeoRouteSegment 개체 목록을 보유합니다.

액세스 함수:

QList<QGeoRouteSegment> segments() const

[read-only] segmentsCount : const qsizetype

이 속성은 경로의 세그먼트 수를 보유합니다.

액세스 함수입니다:

qsizetype segmentsCount() const

[read-only] travelTime : const int

이 속성에는 이 경로를 통과하는 데 걸리는 예상 시간(초)이 저장됩니다.

액세스 함수입니다:

int travelTime() const

멤버 함수 문서

QGeoRoute::QGeoRoute()

경로 객체를 생성합니다.

[noexcept] QGeoRoute::QGeoRoute(const QGeoRoute &other)

other 의 콘텐츠로 경로 객체를 구성합니다.

[noexcept] QGeoRoute::~QGeoRoute()

이 경로 개체를 삭제합니다.

[protected] QExplicitlySharedDataPointer<QGeoRoutePrivate> &QGeoRoute::d()

비공개 구현을 반환합니다.

QGeoRouteSegment QGeoRoute::firstRouteSegment() const

경로의 첫 번째 경로 세그먼트를 반환합니다.

경로와 연결된 경로 세그먼트가 없는 경우 잘못된 경로 세그먼트를 반환합니다.

나머지 경로 세그먼트는 QGeoRouteSegment::nextRouteSegment 를 사용하여 순차적으로 액세스할 수 있습니다.

setFirstRouteSegment()도 참조하세요 .

void QGeoRoute::setFirstRouteSegment(const QGeoRouteSegment &routeSegment)

경로의 첫 번째 경로 세그먼트를 routeSegment 로 설정합니다.

firstRouteSegment()도 참조하세요 .

void QGeoRoute::setTravelMode(QGeoRouteRequest::TravelMode mode)

이 경로의 여행 모드를 mode 로 설정합니다.

요청().travelModes()에서 반환한 여행 모드 중 하나이어야 합니다.

travelMode()도 참조하세요 .

QGeoRouteRequest::TravelMode QGeoRoute::travelMode() const

이 경로의 이동 모드를 반환합니다.

요청().travelModes()에서 반환하는 여행 모드 중 하나이어야 합니다.

setTravelMode()도 참조하세요 .

[noexcept] QGeoRoute &QGeoRoute::operator=(const QGeoRoute &other)

other 의 콘텐츠를 이 경로에 할당하고 이 경로에 대한 참조를 반환합니다.

관련 비회원

[noexcept] bool operator!=(const QGeoRoute &lhs, const QGeoRoute &rhs)

lhsrhs 경로가 같지 않은지 여부를 반환합니다.

[noexcept] bool operator==(const QGeoRoute &lhs, const QGeoRoute &rhs)

lhsrhs 경로가 동일한지 여부를 반환합니다.

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