Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

Qt Location Nokia Plugin

Overview

Included with Qt Location is a geo services plugin which accesses the relevant Nokia services provided by Nokia. The use of these services is governed by the terms and conditions available at Qt Location Nokia Plugin - Nokia Services Terms and Conditions.

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

The Nokia geo services plugin requires an application id and token pair to authenticate the application with the Nokia services. To obtain an application id and token pair visit https://api.developer.nokia.com/

The Nokia geo services plugin can be loaded by using the plugin key "nokia".

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

Parameters

The following table lists optional parameters that can be passed to the Nokia plugin.

ParameterDescription
app_idClient app_id part of the app_id/token pair used for authentication by all managers.
tokenClient token part of the app_id/token pair for the service used for authentication by all managers.
proxyProxy server URL used by all managers. For usage of the system proxy just pass "system" as value.

Note: See the notes in QNetworkProxy for further information.

mapping.hostMap tile service URL used by mapping manager.
mapping.cache.directoryMap tile cache directory used as network disk cache.

Default place for the cache is ".tilecache" directory in QDir.

mapping.cache.disk.sizeMap tile disk cache size in bytes. Default size of the cache is 20MB.
mapping.cache.memory.sizeMap tile memory cache size in bytes. Default size of the cache is 3MB.
mapping.cache.texture.sizeMap tile texture cache size in bytes. Default size of the cache is 6MB. 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.
geocoding.hostGeocoding service URL used by geocoding manager.
routing.hostRouting service URL used by routing manager.
places.hostSearch service URL used by search manager.
places.api_versionVersion 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.
places.themeSpecifies the icon theme to be used for places and categories. If no theme is explicitly provided then the platform theme is used. A default non-platform specific theme can be specified using a value of "default". The supported themes are "wp7_dark" and "default". On desktop platforms the "default" theme is the platform theme.

Parameter Usage Example

The following two examples show how to create a Nokia plugin instance with a proxy server set for use with routing, and a routing token unique to the application.

QML

 Plugin {
     name: "nokia"
     PluginParameter { name: "proxy"; value: "system" }
     PluginParameter { name: "token"; value: "abcdefg12345" }
 }

C++

 QMap<QString,QVariant> params;
 params["proxy"] = "system";
 params["token"] = "abcdefg12345";

 QGeoServiceProvider *gsp = new QGeoServiceProvider("nokia", params);

Places

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

Capabilities

Storageremote
Read/Writeread-only
IconsNo
Search term suggestionsyes
Recommendationsyes
Category structureHierarchical
(Rich) Content imagesyes
(Rich) Content reviewsyes
(Rich) Content editorialsyes
All details fetched during searchno
Paging offset indexno
Paging limityes
Distance relevance hintno
Lexical name relevance hintno
Search term correctionsno
Extended Attributesno
Notifications for added/removed places/categoriesno
visibility scopespublic
favorites matching/(usable as favoritesPlugin)no

Plugin Specific Behaviors and Limitations.

Search

The following list shows what core place data is returned during a place search:

  • name
  • location
  • contact information
  • attribution
  • categories
  • rating
  • visibility

The following list shows further details that may be retrieved via QPlaceManager::getDetails()

  • supplier
  • extended attributes

Searching for Places

Search Term and Categories

The nokia plugin supports searching with a search term and category or categories, however both are not supported simultaneously.

  • Valid usage: search term + search center
  • Valid usage: category + search center
  • Invalid usage: search term + category + search center

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

Search Area

The nokia plugin only supports provision of a search center when searching for places via 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 must be provided for all searches.

Search Term suggestions

Only a partial search term and search center is supported when retrieving suggestions. This limitation applies when using the nokia plugin with the PlaceSearchSuggestionModel and QPlaceManager::searchSuggestions().

Both search term and search center must be provided when retrieving search term suggestions.

Recommendations

Only a given 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 nokia plugin with PlaceRecommendationModel and QPlaceManager::recommendations().

Icons themes, base urls and variants

Icons are provided in the form of "base urls" which reference valid icon images. For example, if the "wp7_dark" theme was specified, then an icon url might look something like http://<server>/01.icon.wp7_dark and this references an actual icon image.

However these urls are "base urls" in the sense that they can be appended onto, to provide variants. For example, one could add ".list.png" to the above url to get the list variant of the icon, http://<server>/01.icon.wp7_dark.list.png.

The following table shows the themes provided by the nokia plugin, along with any variants supported for those themes:

ThemeSupported type variants and appendage strings
"default"no variants supported
"wp7_dark"
  • list : ".list.png"
  • map: ".map.png"

(Note: the default base urls reference a map type icons)

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web