Qt Location 지오서비스
Qt Location 는 대부분의 기능을 GeoService 플러그인을 통해 제공합니다. 이 문서는 새로운 GeoService 플러그인을 개발하는 방법을 설명합니다.
플러그인 설명
각 플러그인은 JSON 파일로 정의됩니다. 이 JSON 파일은 플러그인의 기능과 버전을 설명합니다. 다음은 OpenStreetMap 플러그인에서 사용하는 JSON 파일의 예시입니다:
{
"Keys": ["osm"],
"Provider": "osm",
"Version": 100,
"Experimental": false,
"Features": [
"OnlineMappingFeature",
"OnlineGeocodingFeature",
"ReverseGeocodingFeature",
"OnlineRoutingFeature",
"OnlinePlacesFeature"
]
}각 항목의 의미는 다음과 같습니다:
| 키 | 설명 |
|---|---|
| 키 | 플러그인의 고유한 이름/키입니다. 각 GeoService 플러그인은 고유한 이름을 가져야 합니다. |
| 제공자 | 서비스의 제공자 이름입니다. 여러 플러그인이 동일한 이름을 가질 수 있습니다. 이러한 경우, 플러그인을 더 명확하게 구분하기 위해 버전 문자열이 사용됩니다. |
| 실험적 | 서비스 플러그인을 실험용으로 표시합니다. API 개발자는 ` QGeoServiceProvider::QGeoServiceProvider()`를 인스턴스화할 때 이러한 플러그인을 무시하도록 선택할 수 있습니다. |
| 버전 | 플러그인의 버전입니다. 동일한 제공자 이름을 가진 플러그인이 여러 개인 경우, 버전이 가장 높은 플러그인이 사용됩니다. |
| 기능 | 플러그인/서비스가 제공하는 기능 목록입니다. 각 기능은 QGeoServiceProvider 의 해당 기능을 문자열로 표현한 것입니다. 자세한 내용은 QGeoServiceProvider::routingFeatures(), QGeoServiceProvider::geocodingFeatures() 및 QGeoServiceProvider::placesFeatures()을 참조하십시오. |
플러그인 구현
플러그인 구현자는 QGeoServiceProviderFactory를 상속하고, 구현을 제공하고자 하는 ManagerEngine 클래스를 원하는 만큼 상속받아야 합니다.
QGeoServiceProviderFactory를 상속할 때는 다음 메서드 중 하나만 재정의하면 됩니다:
- QGeoServiceProviderFactory::createGeocodingManagerEngine()
- QGeoServiceProviderFactory::createRoutingManagerEngine()
- QGeoServiceProviderFactory::createPlaceManagerEngine()
플러그인이 특정 엔진을 제공하지 않는 경우, 해당 함수는 ` nullptr`를 반환해야 합니다.
지오코딩 작업을 지원하고자 하는 QGeoServiceProvider 플러그인 구현자를 위한 인터페이스 및 편의 메서드 | |
지리적 경로 정보에 대한 액세스를 제공하고자 하는 QGeoServiceProvider 플러그인 구현자를 위한 인터페이스 및 편의 메서드 | |
장소(place) 기능에 대한 접근을 제공하려는 QGeoServiceProvider 플러그인 구현자를 위한 인터페이스 |
© 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.