Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qtlocation-geoservices.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2017 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qtlocation-geoservices.html
6
\title Qt Location GeoServices
7
\brief Implementing Qt Location GeoService plugins
8
9
The Qt Location provides the majority of its functionality through GeoService plugins. This
10
document outlines how to develop a new GeoService plugin.
11
12
\section1 Plugin Description
13
14
Each plugin is described by a json file. The json describes the plugins capabilities and
15
version. Below is an example of a json file used by the OpenStreenMap plugin:
16
17
18
\quotefile ../../../plugins/geoservices/osm/osm_plugin.json
19
20
The entries have the following meaning:
21
22
\table
23
\header
24
\li Key
25
\li Description
26
\row
27
\li Keys
28
\li The unique name/key of the plugin. Each GeoService plugin must have a unique name.
29
\row
30
\li Provider
31
\li The provider name of the services. Multiple plugins may have the same name.
32
In such cases the Version string will be used to further distinguish the plugins.
33
\row
34
\li Experimental
35
\li Marks the service plugin as experimental. API developers may choose to ignore
36
such plugins when instanciating \l QGeoServiceProvider::QGeoServiceProvider().
37
\row
38
\li Version
39
\li The plugin version. If multiple plugins have the same provider name, the plugin
40
with the higest version will be used.
41
\row
42
\li Features
43
\li List of features provided by the plugin/service. Each feature is a string
44
representation of the corresponding features in \l QGeoServiceProvider. For more
45
details see \l QGeoServiceProvider::routingFeatures(),
46
\l QGeoServiceProvider::geocodingFeatures() and \l QGeoServiceProvider::placesFeatures().
47
48
\endtable
49
50
\section1 Implementing Plugins
51
52
A plugin implementer needs to subclass QGeoServiceProviderFactory and as
53
many of the ManagerEngine classes as they want to provide implementations for.
54
55
Subclassing QGeoServiceProviderFactory will only involves overriding of one of the following
56
methods:
57
58
\list
59
\li \l QGeoServiceProviderFactory::createGeocodingManagerEngine()
60
\li \l QGeoServiceProviderFactory::createRoutingManagerEngine()
61
\li \l QGeoServiceProviderFactory::createPlaceManagerEngine()
62
\endlist
63
64
If a plugin does not provide an engine the relevant function should return \nullptr.
65
66
\annotatedlist QtLocation-impl
67
68
*/
qtlocation
src
location
doc
src
qtlocation-geoservices.qdoc
Generated on
for Qt by
1.14.0