summaryrefslogtreecommitdiff
path: root/src/location/doc/src/plugins/nokia.qdoc
blob: 30fd43f129fc31ca38687159140c704543c14620 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
\page location-plugin-here.html
\title Qt Location HERE Plugin
\ingroup QtLocation-plugins

\brief Uses the relevant services provided by HERE.

\section1 Overview

Included with Qt Location is a geo services plugin which accesses the relevant HERE services
provided by HERE/Nokia.  The use of these services is governed by the terms and conditions
available at \l {https://developer.here.com/terms-conditions}.

Note that accepting the terms and conditions only applies those terms and conditions to the use of
the HERE geo services plugin and does not limit the use of the other geo services plugins that may
be included with Qt.

The HERE geo services plugin can be loaded by using the plugin key "here".

The online plugin uses the tiled map classes, which caches tile data in heap memory and texture
memory.

\section1 Parameters

\section2 Mandatory parameters
The following table lists mandatory parameters that \e must be passed to the HERE plugin.
\table
\header
    \li Parameter
    \li Description
\row
    \li here.app_id
    \li Client \e app_id part of the app_id/token pair used for authentication by all managers.
\row
    \li here.token
    \li Client \e token part of the app_id/token pair for the service used for authentication by all managers.
\endtable

The HERE geo services plugin requires an application id and token pair to authenticate the
application with the HERE services.  To obtain an application id and token pair visit
\l{https://developer.here.com/}

\section2 Optional parameters
The following table lists optional parameters that can be passed to the HERE plugin.

\note Since Qt 5.5 all parameters below must be prefixed with \c here. Previous versions did not require
a prefix.

\table
\header
    \li Parameter
    \li Description
\row
    \li here.proxy
    \li Proxy server URL used by all managers. For usage of the system proxy just pass "system" as value.

    \note See the notes in \l{QNetworkProxyFactory::systemProxyForQuery()} for further information.
\row
    \li here.mapping.host
    \li Base map tile service URL used by mapping manager.
\row
    \li here.mapping.host.aerial
    \li Aerial map tile service URL used by mapping manager. For all satellite, hybrid and terrain schemes.
\row
    \li here.mapping.cache.directory
    \li Absolute path to map tile cache directory used as network disk cache.

    The default place for the cache is the \c{QtLocation/here} subdirectory in the location returned by
    QStandardPaths::writableLocation(), called with QStandardPaths::GenericCacheLocation  as a parameter.
    On systems that have no concept of a shared cache, the application-specific \l{QStandardPaths::CacheLocation} is used instead.

\row
    \li here.mapping.cache.disk.cost_strategy
    \li The cost strategy to use to cache map tiles on disk.
    Valid values are \b bytesize and \b unitary.
    Using \b bytesize, the related size parameter (\b here.mapping.cache.disk.size) will
    be interpreted as bytes.
    Using \b unitary, they will be interpreted as number of tiles.
    The default value for this parameter is \b bytesize.
\row
    \li here.mapping.cache.disk.size
    \li Disk cache size for map tiles. The default size of the cache is 50 MiB when \b bytesize is the cost
    strategy for this cache, or 1000 tiles, when \b unitary is the cost strategy.
\row
    \li here.mapping.cache.memory.cost_strategy
    \li The cost strategy to use to cache map tiles in memory.
    Valid values are \b bytesize and \b unitary.
    Using \b bytesize, the related size parameter (\b here.mapping.cache.memory.size) will
    be interpreted as bytes.
    Using \b unitary, they will be interpreted as number of tiles.
    The default value for this parameter is \b bytesize.
\row
    \li here.mapping.cache.memory.size
    \li Memory cache size for map tiles. The default size of the cache is 3 MiB when \b bytesize is the cost
    strategy for this cache, or 100 tiles, when \b unitary is the cost strategy.
\row
    \li here.mapping.cache.texture.cost_strategy
    \li The cost strategy to use to cache decompressed map tiles in memory.
    Valid values are \b bytesize and \b unitary.
    Using \b bytesize, the related size parameter (\b here.mapping.cache.texture.size) will
    be interpreted as bytes.
    Using \b unitary, they will be interpreted as number of tiles.
    The default value for this parameter is \b bytesize.
\row
    \li here.mapping.cache.texture.size
    \li Texture cache size for map tiles. The default size of the cache is 6 MiB when \b bytesize is the cost
    strategy for this cache, or 30 tiles, when \b unitary is the cost strategy.
    Note that the texture cache has a hard minimum size which depends on the size of the map viewport
    (it must contain enough data to display the tiles currently visible on the display).
    This value is the amount of cache to be used in addition to the bare minimum.
\row
    \li here.mapping.prefetching_style
    \li This parameter allows to provide a hint how tile prefetching is to be performed by the engine. The default value,
    \tt{TwoNeighbourLayers}, makes the engine prefetch tiles for the layer above and the one below the current tile
    layer, providing ready tiles when zooming in or out from the current zoom level.
    \tt{OneNeighbourLayer} only prefetches the one layer closest to the current zoom level.
    Finally, \tt{NoPrefetching} allows to disable the prefetching, so only tiles that are visible will be fetched.
    Note that, depending on the active map type, this hint might be ignored.
\row
    \li here.mapping.highdpi_tiles
    \li Whether or not to request high dpi tiles. Valid values are \b true and \b false. The default value is \b false.
\row
    \li here.geocoding.host
    \li Geocoding service URL used by geocoding manager.
\row
    \li here.routing.host
    \li Routing service URL used by routing manager.
\row
    \li here.places.host
    \li Search service URL used by search manager.
\row
    \li here.places.api_version
    \li Version of the REST API used by the places manager.  Currently versions 1 and 2 are
       supported. The version 1 is deprecated and will not be part of the final Qt release.  The default is version 2.
\endtable

\section1 Parameter Usage Example

The following two examples show how to create a HERE plugin instance with
parameters supplied for an application id and token, which is required for
authentication.

\section2 QML

\code
Plugin {
    name: "here"
    PluginParameter { name: "here.app_id"; value: "myapp" }
    PluginParameter { name: "here.token"; value: "abcdefg12345" }
}
\endcode

\section2 C++

\code
QMap<QString,QVariant> params;
params["here.app_id"] = "myapp";
params["here.token"] = "abcdefg12345";

QGeoServiceProvider *gsp = new QGeoServiceProvider("here", params);
\endcode

\section1 Places
The HERE provider remotely accesses places (read-only) from a REST based server.  The specific capabilities
and behaviours are outlined below:

\section2 Capabilities
\table
    \row
        \li Storage
        \li remote
    \row
        \li Read/Write
        \li read-only
    \row
        \li Icons
        \li yes
    \row
        \li Search term suggestions
        \li yes
    \row
        \li Recommendations
        \li yes
    \row
        \li Category structure
        \li Hierarchical
    \row
        \li (Rich) Content images
        \li yes
    \row
        \li (Rich) Content reviews
        \li yes
    \row
        \li (Rich) Content editorials
        \li yes
    \row
        \li All details fetched during search
        \li no
    \row
        \li Paging offset index
        \li no
    \row
        \li Paging limit
        \li yes
    \row
        \li Distance relevance hint
        \li no
    \row
        \li Lexical name relevance hint
        \li no
    \row
        \li Extended Attributes
        \li yes
    \row
        \li Notifications for added/removed places/categories
        \li no
    \row
        \li visibility scopes
        \li public
    \row
        \li favorites matching/(usable as favoritesPlugin)
        \li no
\endtable

\section2 Plugin Specific Behaviors and Limitations.
\section3 Search
The following list shows what core place data is returned during a place search:
\list
\li name
\li location
\li contact information
\li attribution
\li categories
\li rating
\li visibility
\endlist

The following list shows further details that may be retrieved
via QPlaceManager::getDetails()
\list
\li supplier
\li extended attributes
\endlist

\section3 Searching for Places
\section4 Search Term and Categories
The HERE plugin supports searching with a \e {search term} and \e {category or categories}, however
both are not supported simultaneously.

\list
    \li Valid usage: \e {search term} + \e {search center}
    \li Valid usage: \e {category} + \e {search center}
    \li Invalid usage: \e {search term} + \e {category} + \e {search center}
\endlist

This limitation applies when using the HERE plugin with \l PlaceSearchModel and QPlaceManager::search().

\section4 Search Area
The HERE plugin only supports provision of a \e {search center} when searching for places via \l PlaceSearchModel
and QPlaceManager::search().  A search center can be provided via a bounding circle, however the
radius should be kept at the default value of -1.  Typically a developer should not have to set the radius at all.
If a developer sets a radius, it is ignored by the plugin and the boundaries are not honored.

In a similar manner only the center of a bounding box is taken into consideration when searching.  The boundaries
of the box are not honored.

A search center \e {must} be provided for all searches.

\section4 Relevancy Hints
The HERE plugin does not support relevancy hints.  Any relevancy hints supplied to
a search request are consequently ignored.

\section3 Search Term suggestions
Only a partial \e {search term} and \e {search center} is supported when retrieving suggestions.
This limitation applies when using the HERE plugin with the \l PlaceSearchSuggestionModel and QPlaceManager::searchSuggestions().

Both search term and search center \e {must} be provided when retrieving search term suggestions.

\section3 Recommendations
Only a given \e {place identifier} is supported as a parameter for a recommendations.  No other parameters
such as limit, offset, and  search area are supported.  This limitation applies when using the
HERE plugin with \l PlaceSearchModel and QPlaceManager::search().

\section3 Extended Attributes
The supported set of attributes provided by the HERE plugin are not fixed and
may grow over time.  Also the attributes provided may vary according to a place
by place basis, e.g one place may provide opening hours while another does not.
At the time of writing, it is known that some places provide \c openingHours
(QPlaceAttribute::OpeningHours) and \c payment (QPlaceAttribute::Payment)
methods but other attributes may be made available by the backend server.  All
places provided by the plugin will have the \c x_provider
(QPlaceAttribute::Provider)  attribute set to \c here.

\section3 Restrictions of Usage - ExtendedAttributes and Content
The extended attributes  and rich content of places are not permitted
to be saved.  For QML this is related to \l Place::extendedAttributes, \l ImageModel,
\l ReviewModel, and \l EditorialModel.  For C++ this relates to QPlace::extendedAttribute(),
QPlace::content() and QPlaceManager::getPlaceContent().

(Note that the HERE plugin is a read-only source of places and
does not support saving functionality at all.)
*/