Qt Location API
| Line 16: | Line 16: | ||
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. | 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. | + | The plugins are accessed via <tt>QGeoServiceProvider</tt>, and a Nokia based plugin is part of Qt Mobility. See the section The Nokia plugin for more details. |
<code> | <code> | ||
QGeoMappingManager *mappingManager = 0; | QGeoMappingManager *mappingManager = 0; | ||
| Line 32: | Line 32: | ||
Common classes | Common classes | ||
| − | <table> | + | <table border=1> |
<tr> | <tr> | ||
<td><tt>QGeoBoundingArea</tt></td> | <td><tt>QGeoBoundingArea</tt></td> | ||
<td>Defines a geographic area</td> | <td>Defines a geographic area</td> | ||
</tr> | </tr> | ||
| + | |||
| + | <tr> | ||
| + | <td><tt>QGeoBoundingBox</tt></td> | ||
| + | <td>Defines a rectangular geographic area</td> | ||
| + | </tr> | ||
| + | |||
| + | <tr> | ||
| + | <td><tt>QGeoBoundingCircle</tt></td> | ||
| + | <td>Defines a circular geographic area</td> | ||
| + | </tr> | ||
| + | |||
| + | <tr> | ||
| + | <td><tt>QGeoServiceProvider</tt></td> | ||
| + | <td>Aggregates access to services which provide geographical information</td> | ||
| + | </tr> | ||
| + | |||
</table> | </table> | ||
| − | + | === Mapping === | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | 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: | + | The <tt>QGraphicsGeoMap</tt> 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 <tt>QGraphicsWidget</tt>. |
| + | |||
| + | The <tt>QGeoMappingManager</tt> provides most of the functionality required by <tt>QGraphicsGeoMap</tt>. The details of <tt>QGeoMappingManager</tt> are mostly only important to plugin implementers, as regular users should not need to make use of <tt>QGeoMappingManager</tt> outside of the <tt>QGraphicsGeoMap</tt> constructor: | ||
<code> | <code> | ||
| Line 63: | Line 72: | ||
QGraphicsGeoMap | QGraphicsGeoMap | ||
Used to display a map and manager the interactions between the user and the map | Used to display a map and manager the interactions between the user and the map | ||
| − | |||
| − | |||
| − | |||
| − | |||
Revision as of 14:20, 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 |
Mapping
The 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

