Qt Location API
| Line 9: | Line 9: | ||
# [https://api.forum.nokia.com/ovi-api| Register] your application before deploying it to the store or launching your service. | # [https://api.forum.nokia.com/ovi-api| Register] your application before deploying it to the store or launching your service. | ||
| − | For more information on the business options please | + | For more information on the business options please read our [http://wiki.forum.nokia.com/index.php/Location_APIs_FAQ| FAQs]. |
== Functionality: maps, routing, geocoding and reverse geocoding == | == Functionality: maps, routing, geocoding and reverse geocoding == | ||
| + | The Maps and Navigation API is based on plugins. | ||
| + | |||
| + | Since most providers of mapping, geocoding and routing information offer no guarantees that their data is interoperable with the data provided by other services, the plugins are used to group the functionality per service provider. | ||
| + | |||
| + | The plugins are accessed via QGeoServiceProvider, and a Nokia based plugin is part of Qt Mobility. See the section The Nokia plugin for more details. | ||
| + | <code> | ||
| + | QGeoMappingManager *mappingManager = 0; | ||
| + | QGeoRoutingManager *routingManager = 0; | ||
| + | QGeoSearchManager *searchManager = 0; | ||
| + | |||
| + | QGeoServiceProvider serviceProvider("plugin name"); | ||
| + | |||
| + | if (serviceProvider.error() == QGeoServiceProvider::NoError) { | ||
| + | mappingManager = serviceProvider.mappingManager(); | ||
| + | routingManager = serviceProvider.routingManager(); | ||
| + | searchManager = serviceProvider.searchManager(); | ||
| + | } | ||
| + | </code> | ||
| + | |||
| + | Common classes | ||
| + | <table> | ||
| + | <tr> | ||
| + | <td><tt>QGeoBoundingArea</tt></td> | ||
| + | <td>Defines a geographic area</td> | ||
| + | </tr> | ||
| + | </table> | ||
| + | |||
| + | QGeoBoundingBox | ||
| + | Defines a rectangular geographic area | ||
| + | |||
| + | QGeoBoundingCircle | ||
| + | Defines a circular geographic area | ||
| + | |||
| + | QGeoServiceProvider | ||
| + | Aggregates access to services which provide geographical information | ||
| + | |||
| + | MappingThe QGraphicsGeoMap class is the main class used for displaying and interacting with maps. It is designed for use within the Graphics View Framework, and is a subclass of QGraphicsWidget. | ||
| + | |||
| + | The QGeoMappingManager provides most of the functionality required by QGraphicsGeoMap. The details of QGeoMappingManager are mostly only important to plugin implementers, as regular users should not need to make use of QGeoMappingManager outside of the QGraphicsGeoMap constructor: | ||
| + | |||
| + | <code> | ||
| + | QGraphicsGeoMap *map = new QGraphicsGeoMap(mappingManager);QGeoMapOverlay | ||
| + | </code> | ||
| + | |||
| + | Used to draw overlays on the map | ||
| + | |||
| + | QGeoMappingManager | ||
| + | Support for displaying and interacting with maps | ||
| + | |||
| + | QGraphicsGeoMap | ||
| + | Used to display a map and manager the interactions between the user and the map | ||
| + | |||
== Licensing and business model options == | == Licensing and business model options == | ||
Revision as of 14:07, 14 April 2011
Contents |
Introduction
Qt Location API is part of QtMobility (version 1.1.0 and higher). It provides a map widget, routing, geocoding and reverse geocoding functionality. In addition to this QtMobility provides positioning and landmark functionality.
Installation process
- Install the latest Qt SDK (version 1.1 and higher)
- When installing the SDK you have to accept the T&C for the Location APIs
- Start developing software
- Register your application before deploying it to the store or launching your service.
For more information on the business options please read our FAQs.
Functionality: maps, routing, geocoding and reverse geocoding
The Maps and Navigation API is based on plugins.
Since most providers of mapping, geocoding and routing information offer no guarantees that their data is interoperable with the data provided by other services, the plugins are used to group the functionality per service provider.
The plugins are accessed via QGeoServiceProvider, and a Nokia based plugin is part of Qt Mobility. See the section The Nokia plugin for more details.
QGeoMappingManager *mappingManager = 0;
QGeoRoutingManager *routingManager = 0;
QGeoSearchManager *searchManager = 0;
QGeoServiceProvider serviceProvider("plugin name");
if (serviceProvider.error() == QGeoServiceProvider::NoError) {
mappingManager = serviceProvider.mappingManager();
routingManager = serviceProvider.routingManager();
searchManager = serviceProvider.searchManager();
}
Common classes
| QGeoBoundingArea | Defines a geographic area |
QGeoBoundingBox
Defines a rectangular geographic area
QGeoBoundingCircle
Defines a circular geographic area
QGeoServiceProvider
Aggregates access to services which provide geographical information
MappingThe QGraphicsGeoMap class is the main class used for displaying and interacting with maps. It is designed for use within the Graphics View Framework, and is a subclass of QGraphicsWidget.
The QGeoMappingManager provides most of the functionality required by QGraphicsGeoMap. The details of QGeoMappingManager are mostly only important to plugin implementers, as regular users should not need to make use of QGeoMappingManager outside of the QGraphicsGeoMap constructor:
QGraphicsGeoMap *map = new QGraphicsGeoMap(mappingManager);QGeoMapOverlay
Used to draw overlays on the map
QGeoMappingManager
Support for displaying and interacting with maps
QGraphicsGeoMap
Used to display a map and manager the interactions between the user and the map

