1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
5\page qtlocation-geoservices.html
6\title Qt Location GeoServices
7\brief Implementing Qt Location GeoService plugins
9The Qt Location provides the majority of its functionality through GeoService plugins. This
10document outlines how to develop a new GeoService plugin.
12\section1 Plugin Description
14Each plugin is described by a json file. The json describes the plugins capabilities and
15version. Below is an example of a json file used by the OpenStreenMap plugin:
18\quotefile ../../../plugins/geoservices/osm/osm_plugin.json
20The entries have the following meaning:
28 \li The unique name/key of the plugin. Each GeoService plugin must have a unique name.
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.
35 \li Marks the service plugin as experimental. API developers may choose to ignore
36 such plugins when instanciating \l QGeoServiceProvider::QGeoServiceProvider().
39 \li The plugin version. If multiple plugins have the same provider name, the plugin
40 with the higest version will be used.
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().
50\section1 Implementing Plugins
52A plugin implementer needs to subclass QGeoServiceProviderFactory and as
53many of the ManagerEngine classes as they want to provide implementations for.
55Subclassing QGeoServiceProviderFactory will only involves overriding of one of the following
59 \li \l QGeoServiceProviderFactory::createGeocodingManagerEngine()
60 \li \l QGeoServiceProviderFactory::createRoutingManagerEngine()
61 \li \l QGeoServiceProviderFactory::createPlaceManagerEngine()
64If a plugin does not provide an engine the relevant function should return \nullptr.
66\annotatedlist QtLocation-impl