QGeoCodingManager Class
QGeoCodingManager 클래스는 지오코딩 작업을 지원합니다. 더 보기...
| Header: | #include <QGeoCodingManager> |
| qmake: | QT += location |
| Inherits: | QObject |
공개 함수
| virtual | ~QGeoCodingManager() |
| QGeoCodeReply * | geocode(const QGeoAddress &address, const QGeoShape &bounds = QGeoShape()) |
| QGeoCodeReply * | geocode(const QString &address, int limit = -1, int offset = 0, const QGeoShape &bounds = QGeoShape()) |
| QLocale | locale() const |
| QString | managerName() const |
| int | managerVersion() const |
| QGeoCodeReply * | reverseGeocode(const QGeoCoordinate &coordinate, const QGeoShape &bounds = QGeoShape()) |
| void | setLocale(const QLocale &locale) |
신호
| void | errorOccurred(QGeoCodeReply *reply, QGeoCodeReply::Error error, const QString &errorString = QString()) |
| void | finished(QGeoCodeReply *reply) |
상세 설명
geocode() 및 reverseGeocode() 함수는 QGeoCodeReply 객체를 반환하며, 이 객체는 해당 작업을 관리하고 작업 결과 및 발생한 오류를 보고합니다.
geocode() 및 reverseGeocode() 함수는 QGeoAddress 인스턴스를 QGeoCoordinate 인스턴스로, 또는 그 반대로 변환하는 데 사용할 수 있습니다.
geocode() 함수는 사용자가 자유 텍스트 지오코딩 작업을 수행할 수 있도록 오버로드되어 있으며, 제공된 문자열이 주소로 해석될 수 있는 경우 좌표 정보로 지오코딩할 수 있습니다.
QGeoCodingManager 인스턴스는 QGeoServiceProvider::geocodingManager()을 통해 액세스할 수 있습니다.
멤버 함수 문서
[virtual noexcept] QGeoCodingManager::~QGeoCodingManager()
이 관리자를 삭제합니다.
[signal] void QGeoCodingManager::errorOccurred(QGeoCodeReply *reply, QGeoCodeReply::Error error, const QString &errorString = QString())
이 신호는 reply 의 처리 과정에서 오류가 감지되었을 때 발생합니다. 이후 QGeoCodingManager::finished() 신호가 발생할 가능성이 높습니다.
오류는 오류 코드 error 로 설명됩니다. errorString 가 비어 있지 않은 경우, 해당 객체에는 오류에 대한 텍스트 설명이 포함됩니다.
이 신호와 QGeoCodeReply::errorOccurred()은 동시에 발생합니다.
참고: 이 신호에 연결된 슬롯에서 reply 객체를 삭제하지마십시오 . 대신 deleteLater()를 사용하십시오.
[signal] void QGeoCodingManager::finished(QGeoCodeReply *reply)
reply 의 처리가 완료되면 이 신호가 발생합니다.
reply::error()가 QGeoCodeReply::NoError 와 같다면 처리가 성공적으로 완료된 것입니다.
이 신호와 QGeoCodeReply::finished()는 동시에 발산됩니다.
참고: 이 신호에 연결된 슬롯에서 reply 객체를 삭제하지마십시오 . 대신 deleteLater()를 사용하십시오.
QGeoCodeReply *QGeoCodingManager::geocode(const QGeoAddress &address, const QGeoShape &bounds = QGeoShape())
address 의 지오코딩을 시작합니다. 지오코딩이란 주어진 주소에 해당하는 좌표를 찾는 과정입니다.
QGeoCodeReply 객체가 반환되며, 이 객체를 사용하여 지오코딩 작업을 관리하고 작업 결과를 반환할 수 있습니다.
이 관리자와 반환된 QGeoCodeReply 객체는 작업이 완료되었는지 또는 오류가 발생했는지를 나타내는 신호를 발산합니다.
supportsGeocoding()이 false를 반환하면 QGeoCodeReply::UnsupportedOptionError 가 발생합니다.
작업이 완료되면 QGeoCodeReply::locations()를 사용하여 결과를 가져올 수 있으며, 이 결과는 QGeoLocation 객체 목록으로 구성됩니다. 이 객체들은 좌표와 주소 데이터의 조합을 나타냅니다.
결과에 반환된 주소 데이터는 ` address`와 다를 수 있습니다. 이는 일반적으로 지오코딩 서비스 백엔드가 다른 표준 주소 형식을 사용하거나 ` address `가 부분적으로만 입력된 경우에 발생합니다.
bounds 가 null이 아니며 유효한 QGeoShape 인 경우, 이 주소는 결과 범위를 bounds 내에 포함된 항목으로 제한하는 데 사용됩니다. 이는 address 가 부분적으로만 입력된 경우에 특히 유용합니다. 서비스가 지정된 데이터와 일치하는 모든 항목에 대해 지오코딩을 시도하기 때문입니다.
반환된 reply 객체를 삭제하는 것은 사용자의 책임이지만, QGeoCodingManager::finished(), QGeoCodingManager::errorOccurred(), QGeoCodeReply::finished() 또는 QGeoCodeReply::errorOccurred()에 연결된 슬롯에서 deleteLater()을 사용하여 삭제할 수도 있습니다.
QGeoCodeReply *QGeoCodingManager::geocode(const QString &address, int limit = -1, int offset = 0, const QGeoShape &bounds = QGeoShape())
address 에 해당하는 위치에 대한 지오코딩을 시작합니다.
QGeoCodeReply 객체가 반환되며, 이 객체를 사용하여 지오코딩 작업을 관리하고 작업 결과를 반환할 수 있습니다.
이 관리자와 반환된 QGeoCodeReply 객체는 작업이 완료되었는지 또는 오류가 발생했는지를 나타내는 신호를 발산합니다.
작업이 완료되면 QGeoCodeReply::locations()를 사용하여 결과를 가져올 수 있으며, 결과는 QGeoLocation 객체 목록으로 구성됩니다. 이 객체들은 좌표와 주소 데이터의 조합을 나타냅니다.
limit 가 -1인 경우 전체 결과 집합이 반환되며, 그렇지 않은 경우 최대 limit 개의 결과가 반환됩니다.
offset 매개변수는 지오코딩 서비스에 처음 offset 개의 결과를 반환하지 않도록 요청하는 데 사용됩니다.
limit 및 offset 결과는 페이징을 구현하기 위해 함께 사용됩니다.
bounds 이 null이 아니며 유효한 QGeoShape 인 경우, 이 값은 결과를 bounds 내에 포함된 결과로만 제한하는 데 사용됩니다.
반환된 reply 객체를 삭제하는 것은 사용자의 책임이지만, QGeoCodingManager::finished(), QGeoCodingManager::errorOccurred(), QGeoCodeReply::finished() 또는 QGeoCodeReply::errorOccurred()에 연결된 슬롯에서 deleteLater()을 사용하여 이를 수행할 수도 있습니다.
QLocale QGeoCodingManager::locale() const
이 지오코딩 관리자에게 결과에 사용할 언어를 알려주는 데 사용되는 로케일을 반환합니다.
setLocale()도 참조하십시오 .
QString QGeoCodingManager::managerName() const
이 지오코딩 관리자의 동작을 구현하는 엔진의 이름을 반환합니다.
managerName()과 managerVersion()의 조합은 플러그인 구현체 내에서 고유해야 합니다.
int QGeoCodingManager::managerVersion() const
이 지오코딩 관리자의 동작을 구현하는 엔진의 버전을 반환합니다.
managerName()와 managerVersion()의 조합은 플러그인 구현체 간에 고유해야 합니다.
QGeoCodeReply *QGeoCodingManager::reverseGeocode(const QGeoCoordinate &coordinate, const QGeoShape &bounds = QGeoShape())
coordinate 에 대한 역지오코딩을 시작합니다. 역지오코딩이란 주어진 좌표에 해당하는 주소를 찾는 과정입니다.
QGeoCodeReply 객체가 반환되며, 이 객체를 사용하여 역지오코딩 작업을 관리하고 작업 결과를 반환할 수 있습니다.
이 매니저와 반환된 QGeoCodeReply 객체는 작업이 완료되었는지 또는 오류가 발생했는지를 나타내는 신호를 발산합니다.
supportsReverseGeocoding()이 false를 반환하면 QGeoCodeReply::UnsupportedOptionError 가 발생합니다.
이 시점에서 ` QGeoCodeReply::locations()`를 사용하여 결과를 가져올 수 있으며, 결과는 ` QGeoLocation ` 객체 목록으로 구성됩니다. 이 객체들은 좌표와 주소 데이터의 조합을 나타냅니다.
결과에 반환된 좌표 데이터는 ` coordinate`와 다를 수 있습니다. 이는 일반적으로 역지오코딩 서비스 백엔드가 좌표를 일치하는 주소에 더 가깝게 조정하거나, 백엔드가 여러 세부 수준에서 결과를 반환하는 경우에 발생합니다.
역지오코딩 서비스 백엔드에서 여러 개의 결과가 반환되는 경우, 결과는 구체성 순서대로 제공됩니다. 이는 일반적으로 백엔드가 여러 세부 수준에 걸쳐 역지오코딩을 수행하도록 구성된 경우 발생합니다. 예를 들어, 일부 서비스는 도로 주소, 도시, 주 및 국가에 대한 주소와 좌표 쌍을 반환합니다.
bounds 가 null이 아니며 유효한 QGeoRectangle 인 경우, 이 값을 사용하여 결과를 bounds 내에 포함된 결과로만 제한합니다.
반환된 응답 객체를 삭제하는 것은 사용자의 책임이지만, 이는 QGeoCodingManager::finished(), QGeoCodingManager::errorOccurred(), QGeoCodeReply::finished() 또는 QGeoCodeReply::errorOccurred()에 연결된 슬롯에서 deleteLater()을 사용하여 수행할 수 있습니다.
void QGeoCodingManager::setLocale(const QLocale &locale)
이 관리자가 사용할 로케일을 locale 로 설정합니다.
이 지오코딩 관리자가 결과를 다른 언어로 반환하는 기능을 지원하는 경우, 결과는 locale 의 언어로 반환됩니다.
이 로케일이 설정되지 않은 경우, 사용되는 로케일은 기본적으로 시스템 로케일로 설정됩니다.
locale()도 참조하십시오 .
© 2026 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.