×
Namespaces

Variants
Actions
(Difference between revisions)

Qt Location API

From Nokia Developer Wiki
Jump to: navigation, search
fisch_u (Talk | contribs)
fisch_u (Talk | contribs)
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 <tt>QGeoServiceProvider</tt>, 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 style="color:#00732F">QGeoServiceProvider</tt>, and a Nokia based plugin is part of Qt Mobility. See the section [[#The Nokia plugin | The Nokia plugin]] for more details.
 
<code>
 
<code>
 
     QGeoMappingManager *mappingManager = 0;
 
     QGeoMappingManager *mappingManager = 0;
Line 31: Line 31:
 
</code>
 
</code>
  
Common classes
+
=== Common classes ===
 
<table>
 
<table>
 
<tr>
 
<tr>
<td><tt>QGeoBoundingArea</tt></td>
+
<td><tt style="color:#00732F">QGeoBoundingArea</tt></td>
 
<td>Defines a geographic area</td>
 
<td>Defines a geographic area</td>
 
</tr>
 
</tr>
  
 
<tr>
 
<tr>
<td><tt>QGeoBoundingBox</tt></td>
+
<td><tt style="color:#00732F">QGeoBoundingBox</tt></td>
 
<td>Defines a rectangular geographic area</td>
 
<td>Defines a rectangular geographic area</td>
 
</tr>
 
</tr>
  
 
<tr>
 
<tr>
<td><tt>QGeoBoundingCircle</tt></td>
+
<td><tt style="color:#00732F">QGeoBoundingCircle</tt></td>
 
<td>Defines a circular geographic area</td>
 
<td>Defines a circular geographic area</td>
 
</tr>
 
</tr>
  
 
<tr>
 
<tr>
<td><tt>QGeoServiceProvider</tt></td>
+
<td><tt style="color:#00732F">QGeoServiceProvider</tt></td>
 
<td>Aggregates access to services which provide geographical information</td>
 
<td>Aggregates access to services which provide geographical information</td>
 
</tr>
 
</tr>
Line 57: Line 57:
 
=== Mapping ===
 
=== Mapping ===
  
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 style="color:#00732F">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 style="color:#00732F">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:
+
The <tt style="color:#00732F">QGeoMappingManager</tt> provides most of the functionality required by <tt style="color:#00732F">QGraphicsGeoMap</tt>. The details of <tt style="color:#00732F">QGeoMappingManager</tt> are mostly only important to plugin implementers, as regular users should not need to make use of <tt style="color:#00732F">QGeoMappingManager</tt> outside of the <tt style="color:#00732F">QGraphicsGeoMap</tt> constructor:
  
 
<code>
 
<code>
Line 67: Line 67:
 
<table>
 
<table>
 
<tr>
 
<tr>
<td><tt>QGeoMapOverlay</tt></td>
+
<td><tt style="color:#00732F">QGeoMapOverlay</tt></td>
 
<td>Used to draw overlays on the map
 
<td>Used to draw overlays on the map
 
</td>
 
</td>
Line 73: Line 73:
  
 
<tr>
 
<tr>
<td><tt>QGeoMappingManager</tt></td>
+
<td><tt style="color:#00732F">QGeoMappingManager</tt></td>
 
<td>Support for displaying and interacting with maps</td>
 
<td>Support for displaying and interacting with maps</td>
 
</tr>
 
</tr>
  
 
<tr>
 
<tr>
<td><tt>QGraphicsGeoMap</tt></td>
+
<td><tt style="color:#00732F">QGraphicsGeoMap</tt></td>
 
<td>Used to display a map and manager the interactions between the user and the map</td>
 
<td>Used to display a map and manager the interactions between the user and the map</td>
 
</tr>
 
</tr>
Line 85: Line 85:
  
 
==== Map objects ====
 
==== Map objects ====
<tt>QGeoMapObject</tt> and its subclasses provide the ability to add graphics to the map specified in terms of coordinates and distances. <tt>QGeoMapObject instances</tt> can also be grouped into heirarchies in order to simplify the process of creating compound objects and managing groups of objects.
+
<tt style="color:#00732F">QGeoMapObject</tt> and its subclasses provide the ability to add graphics to the map specified in terms of coordinates and distances. <tt style="color:#00732F">QGeoMapObject</tt> instances can also be grouped into hierarchies in order to simplify the process of creating compound objects and managing groups of objects.
 
<table>
 
<table>
 
<tr>
 
<tr>
<td><tt>QGeoMapCircleObject</tt></td>
+
<td><tt style="color:#00732F">QGeoMapCircleObject</tt></td>
 
<td>Used to draw overlays on the map
 
<td>Used to draw overlays on the map
 
</td>
 
</td>
Line 94: Line 94:
  
 
<tr>
 
<tr>
<td><tt>QGeoMapGroupObject</tt></td>
+
<td><tt style="color:#00732F">QGeoMapGroupObject</tt></td>
 
<td>Support for displaying and interacting with maps</td>
 
<td>Support for displaying and interacting with maps</td>
 
</tr>
 
</tr>
  
 
<tr>
 
<tr>
<td><tt>QGeoMapObject</tt></td>
+
<td><tt style="color:#00732F">QGeoMapObject</tt></td>
 
<td>QGeoMapObject used to draw a pixmap on a map</td>
 
<td>QGeoMapObject used to draw a pixmap on a map</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
  
<td><tt>QGeoMapPixmapObject</tt></td>
+
<td><tt style="color:#00732F">QGeoMapPixmapObject</tt></td>
 
<td>Used to display a map and manager the interactions between the user and the map</td>
 
<td>Used to display a map and manager the interactions between the user and the map</td>
 
</tr>
 
</tr>
  
 
<tr>
 
<tr>
<td><tt>QGeoMapPolygonObject</tt></td>
+
<td><tt style="color:#00732F">QGeoMapPolygonObject</tt></td>
 
<td>QGeoMapObject used to draw a polygon on a map</td>
 
<td>QGeoMapObject used to draw a polygon on a map</td>
 
</tr>
 
</tr>
Line 115: Line 115:
  
 
<tr>
 
<tr>
<td><tt>QGeoMapPolylineObject</tt></td>
+
<td><tt style="color:#00732F">QGeoMapPolylineObject</tt></td>
 
<td>QGeoMapObject used to draw a segmented line on a map</td>
 
<td>QGeoMapObject used to draw a segmented line on a map</td>
 
</tr>
 
</tr>
Line 121: Line 121:
  
 
<tr>
 
<tr>
<td><tt>QGeoMapRectangleObject</tt></td>
+
<td><tt style="color:#00732F">QGeoMapRectangleObject</tt></td>
 
<td>QGeoMapObject used to draw a rectangular region on a map</td>
 
<td>QGeoMapObject used to draw a rectangular region on a map</td>
 
</tr>
 
</tr>
  
 
<tr>
 
<tr>
<td><tt>QGeoMapRouteObject</tt></td>
+
<td><tt style="color:#00732F">QGeoMapRouteObject</tt></td>
 
<td>QGeoMapObject used to draw a route on a map</td>
 
<td>QGeoMapObject used to draw a route on a map</td>
 
</tr>
 
</tr>
  
 
<tr>
 
<tr>
<td><tt>QGeoMapTextObject</tt></td>
+
<td><tt style="color:#00732F">QGeoMapTextObject</tt></td>
 
<td>QGeoMapObject used to draw text on a map</td>
 
<td>QGeoMapObject used to draw text on a map</td>
 
</tr>
 
</tr>
Line 139: Line 139:
  
 
=== Routing ===
 
=== Routing ===
<tt>QGeoRoutingManager</tt> handles requests for routing information.
+
<tt style="color:#00732F">QGeoRoutingManager</tt> handles requests for routing information.
  
The requests are created as <tt>QGeoRouteRequest<tt> instances, which are passed to <tt>QGeoRoutingManager::calculateRoute()</tt>. The returned <tt>QGeoRouteReply</tt> instance will contain the result of the request when it is completed.
+
The requests are created as <tt style="color:#00732F">QGeoRouteRequest</tt> instances, which are passed to <tt style="color:#00732F">QGeoRoutingManager::calculateRoute()</tt>. The returned <tt style="color:#00732F">QGeoRouteReply</tt> instance will contain the result of the request when it is completed.
  
The <tt>QGeoRoute</tt> class describes the resulting route. Each route is broken up into a number of <tt>QGeoRouteSegment</tt> instances, with the division usually occurring at either user specified waypoints or at changes in the mode of transport, like when changing from a train to a bus.
+
The <tt style="color:#00732F">QGeoRoute</tt> class describes the resulting route. Each route is broken up into a number of <tt style="color:#00732F">QGeoRouteSegment</tt> instances, with the division usually occurring at either user specified waypoints or at changes in the mode of transport, like when changing from a train to a bus.
  
Each <tt>QGeoRouteSegment</tt> has a <tt>QGeoNavigationInstruction</tt> instance which describes the instructions that would be issued to a user attempting to follow a route. These instructions a location, which is typically somewhere near the end of the associated <tt>QGeoRouteSegment</tt>, and instruction text describing how the next <tt>QGeoRouteSegment</tt> should be reached.
+
Each <tt style="color:#00732F">QGeoRouteSegment</tt> has a <tt style="color:#00732F">QGeoNavigationInstruction</tt> instance which describes the instructions that would be issued to a user attempting to follow a route. These instructions a location, which is typically somewhere near the end of the associated <tt style="color:#00732F">QGeoRouteSegment</tt>, and instruction text describing how the next <tt style="color:#00732F">QGeoRouteSegment</tt> should be reached.
  
 
<table>
 
<table>
  
 
<tr>
 
<tr>
<td><tt>QGeoManeuver</tt></td>
+
<td><tt style="color:#00732F">QGeoManeuver</tt></td>
 
<td>Represents the information relevant to the point at which two QGeoRouteSegments meet
 
<td>Represents the information relevant to the point at which two QGeoRouteSegments meet
 
</td>
 
</td>
Line 156: Line 156:
  
 
<tr>
 
<tr>
<td><tt>QGeoRoute</tt></td>
+
<td><tt style="color:#00732F">QGeoRoute</tt></td>
 
<td>Represents a route between two points
 
<td>Represents a route between two points
 
</td>
 
</td>
Line 162: Line 162:
  
 
<tr>
 
<tr>
<td><tt>QGeoRouteReply</tt></td>
+
<td><tt style="color:#00732F">QGeoRouteReply</tt></td>
 
<td>Manages an operation started by an instance of QGeoRoutingManager
 
<td>Manages an operation started by an instance of QGeoRoutingManager
 
</td>
 
</td>
Line 168: Line 168:
  
 
<tr>
 
<tr>
<td><tt>QGeoRouteRequest</tt></td>
+
<td><tt style="color:#00732F">QGeoRouteRequest</tt></td>
 
<td>Represents the parameters and restrictions which define a request for routing information
 
<td>Represents the parameters and restrictions which define a request for routing information
 
</td>
 
</td>
Line 174: Line 174:
  
 
<tr>
 
<tr>
<td><tt>QGeoRouteSegment</tt></td>
+
<td><tt style="color:#00732F">QGeoRouteSegment</tt></td>
 
<td>Represents a segment of a route
 
<td>Represents a segment of a route
 
</td>
 
</td>
Line 180: Line 180:
  
 
<tr>
 
<tr>
<td><tt>QGeoRoutingManager</tt></td>
+
<td><tt style="color:#00732F">QGeoRoutingManager</tt></td>
 
<td>Support for geographic routing operations
 
<td>Support for geographic routing operations
 
</td>
 
</td>
Line 189: Line 189:
 
=== Geocoding and searching for places ===
 
=== Geocoding and searching for places ===
  
<tt>QGeoSearchManager</tt> handles geocoding, reverse geocoding and free-text search for places.
+
<tt style="color:#00732F">QGeoSearchManager</tt> handles geocoding, reverse geocoding and free-text search for places.
  
 
The free-text search will attempt to geocode text that looks like an address while simultaneously searching any landmark databases that the service pro. It is even possibly to add additional QLandmarkManager instances to the soures of data, so that users can search online databases alongside their personal offline landmarks store.
 
The free-text search will attempt to geocode text that looks like an address while simultaneously searching any landmark databases that the service pro. It is even possibly to add additional QLandmarkManager instances to the soures of data, so that users can search online databases alongside their personal offline landmarks store.
Line 196: Line 196:
  
 
<tr>
 
<tr>
<td><tt>QGeoSearchManager</tt></td>
+
<td><tt style="color:#00732F">QGeoSearchManager</tt></td>
 
<td>Support for searching operations related to geographic information
 
<td>Support for searching operations related to geographic information
 
</td>
 
</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td><tt>QGeoSearchReply</tt></td>
+
<td><tt style="color:#00732F">QGeoSearchReply</tt></td>
 
<td>Manages an operation started by an instance of QGeoSearchManager
 
<td>Manages an operation started by an instance of QGeoSearchManager
 
</td>
 
</td>
Line 219: Line 219:
 
=== Implementing plugins ===
 
=== Implementing plugins ===
  
A plugin implementer needs to subclass <tt>QGeoServiceProviderFactory</tt> and as many of the ManagerEngine classes as they want to provide implementations for.
+
A plugin implementer needs to subclass <tt style="color:#00732F">QGeoServiceProviderFactory</tt> and as many of the ManagerEngine classes as they want to provide implementations for.
  
Subclassing <tt>QGeoServiceProviderFactory</tt> will only involve exposing a name and a version by overriding <tt>QGeoServiceProviderFactory::providerName()</tt> and <tt>QGeoServiceProviderFactory::providerVersion()</tt>, and overriding <tt>QGeoServiceProviderFactory::createSearchManagerEngine()</tt>, <tt>QGeoServiceProviderFactory::createMappingManagerEngine()</tt> and <tt>QGeoServiceProviderFactory::createRoutingManagerEngine()</tt> as appropriate.
+
Subclassing <tt style="color:#00732F">QGeoServiceProviderFactory</tt> will only involve exposing a name and a version by overriding <tt style="color:#00732F">QGeoServiceProviderFactory::providerName()</tt> and <tt style="color:#00732F">QGeoServiceProviderFactory::providerVersion()</tt>, and overriding <tt style="color:#00732F">QGeoServiceProviderFactory::createSearchManagerEngine()</tt>, <tt style="color:#00732F">QGeoServiceProviderFactory::createMappingManagerEngine()</tt> and <tt style="color:#00732F">QGeoServiceProviderFactory::createRoutingManagerEngine()</tt> as appropriate.
  
 
<table>
 
<table>
  
 
<tr>
 
<tr>
<td><tt>QGeoMapData</tt></td>
+
<td><tt style="color:#00732F">QGeoMapData</tt></td>
 
<td>Are used as a bridge between QGraphicsGeoMap and QGeoMappingManager
 
<td>Are used as a bridge between QGraphicsGeoMap and QGeoMappingManager
 
</td>
 
</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td><tt>QGeoMapObjectInfo</tt></td>
+
<td><tt style="color:#00732F">QGeoMapObjectInfo</tt></td>
 
<td>The base class used to define the parts of QGeoMapObject and its subclasses that are specific to a particular QGeoMapData subclass
 
<td>The base class used to define the parts of QGeoMapObject and its subclasses that are specific to a particular QGeoMapData subclass
 
</td>
 
</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td><tt>QGeoMappingManagerEngine</tt></td>
+
<td><tt style="color:#00732F">QGeoMappingManagerEngine</tt></td>
 
<td>Interface and convenience methods to implementors of QGeoServiceProvider plugins who want to provides support for displaying and interacting with maps
 
<td>Interface and convenience methods to implementors of QGeoServiceProvider plugins who want to provides support for displaying and interacting with maps
 
</td>
 
</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td><tt>QGeoRoutingManagerEngine</tt></td>
+
<td><tt style="color:#00732F">QGeoRoutingManagerEngine</tt></td>
 
<td>Interface and convenience methods to implementers of QGeoServiceProvider plugins who want to provide access to geographic routing information
 
<td>Interface and convenience methods to implementers of QGeoServiceProvider plugins who want to provide access to geographic routing information
 
</td>
 
</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td><tt>QGeoSearchManager</tt></td>
+
<td><tt style="color:#00732F">QGeoSearchManager</tt></td>
 
<td>Interface and convenience methods to implementers of QGeoServiceProvider plugins who want to provide support for searching operations related to geographic data
 
<td>Interface and convenience methods to implementers of QGeoServiceProvider plugins who want to provide support for searching operations related to geographic data
 
</td>
 
</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td><tt>QGeoServiceProviderFactory</tt></td>
+
<td><tt style="color:#00732F">QGeoServiceProviderFactory</tt></td>
 
<td>Factory class used as the plugin interface for services related to geographical information
 
<td>Factory class used as the plugin interface for services related to geographical information
 
</td>
 
</td>
Line 262: Line 262:
 
Most of the current tile based mapping APIs are very similar, and so we provide a number of classes intended to make writing tile based mapping plugins much simpler.
 
Most of the current tile based mapping APIs are very similar, and so we provide a number of classes intended to make writing tile based mapping plugins much simpler.
  
If the Mercator projection and the most common tile addressing scheme is used this will mainly involve subclassing <tt>QGeoTiledMappingManagerEngine</tt> and providing an implementation of <tt>QGeoTiledMappingManagerEngine::getTileImage()</tt>.
+
If the Mercator projection and the most common tile addressing scheme is used this will mainly involve subclassing <tt style="color:#00732F">QGeoTiledMappingManagerEngine</tt> and providing an implementation of <tt style="color:#00732F">QGeoTiledMappingManagerEngine::getTileImage()</tt>.
  
 
<table>
 
<table>
  
 
<tr>
 
<tr>
<td><tt>QGeoTiledMapData</tt></td>
+
<td><tt style="color:#00732F">QGeoTiledMapData</tt></td>
 
<td>Subclass of QGeoMapData provided to make working with tile based mapping services more convenient
 
<td>Subclass of QGeoMapData provided to make working with tile based mapping services more convenient
 
</td>
 
</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td><tt>QGeoTiledMapReply</tt></td>
+
<td><tt style="color:#00732F">QGeoTiledMapReply</tt></td>
 
<td>Manages a tile fetch operation started by an instance of QGeoTiledManagerEngine
 
<td>Manages a tile fetch operation started by an instance of QGeoTiledManagerEngine
 
</td>
 
</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td><tt>QGeoTiledMapRequest</tt></td>
+
<td><tt style="color:#00732F">QGeoTiledMapRequest</tt></td>
 
<td>Represents a request for a map tile from a tile-based mapping service
 
<td>Represents a request for a map tile from a tile-based mapping service
 
</td>
 
</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td><tt>QGeoTiledMappingManagerEngine</tt></td>
+
<td><tt style="color:#00732F">QGeoTiledMappingManagerEngine</tt></td>
 
<td>Provided to make writing Qt Maps and Navigation API plugins for tiled based mapping services easier
 
<td>Provided to make writing Qt Maps and Navigation API plugins for tiled based mapping services easier
 
</td>
 
</td>

Revision as of 17:05, 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

  1. Install the latest Qt SDK (version 1.1 and higher)
  2. When installing the SDK you have to accept the T&C for the Location APIs
  3. Start developing software
  4. Register your application before deploying it to the store or launching your service.

For more information on the business options please read our FAQs.

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

Map objects

QGeoMapObject and its subclasses provide the ability to add graphics to the map specified in terms of coordinates and distances. QGeoMapObject instances can also be grouped into hierarchies in order to simplify the process of creating compound objects and managing groups of objects.

QGeoMapCircleObject Used to draw overlays on the map
QGeoMapGroupObject Support for displaying and interacting with maps
QGeoMapObject QGeoMapObject used to draw a pixmap on a map
QGeoMapPixmapObject Used to display a map and manager the interactions between the user and the map
QGeoMapPolygonObject QGeoMapObject used to draw a polygon on a map
QGeoMapPolylineObject QGeoMapObject used to draw a segmented line on a map
QGeoMapRectangleObject QGeoMapObject used to draw a rectangular region on a map
QGeoMapRouteObject QGeoMapObject used to draw a route on a map
QGeoMapTextObject QGeoMapObject used to draw text on a map


Routing

QGeoRoutingManager handles requests for routing information.

The requests are created as QGeoRouteRequest instances, which are passed to QGeoRoutingManager::calculateRoute(). The returned QGeoRouteReply instance will contain the result of the request when it is completed.

The QGeoRoute class describes the resulting route. Each route is broken up into a number of QGeoRouteSegment instances, with the division usually occurring at either user specified waypoints or at changes in the mode of transport, like when changing from a train to a bus.

Each QGeoRouteSegment has a QGeoNavigationInstruction instance which describes the instructions that would be issued to a user attempting to follow a route. These instructions a location, which is typically somewhere near the end of the associated QGeoRouteSegment, and instruction text describing how the next QGeoRouteSegment should be reached.

QGeoManeuver Represents the information relevant to the point at which two QGeoRouteSegments meet
QGeoRoute Represents a route between two points
QGeoRouteReply Manages an operation started by an instance of QGeoRoutingManager
QGeoRouteRequest Represents the parameters and restrictions which define a request for routing information
QGeoRouteSegment Represents a segment of a route
QGeoRoutingManager Support for geographic routing operations

Geocoding and searching for places

QGeoSearchManager handles geocoding, reverse geocoding and free-text search for places.

The free-text search will attempt to geocode text that looks like an address while simultaneously searching any landmark databases that the service pro. It is even possibly to add additional QLandmarkManager instances to the soures of data, so that users can search online databases alongside their personal offline landmarks store.

QGeoSearchManager Support for searching operations related to geographic information
QGeoSearchReply Manages an operation started by an instance of QGeoSearchManager


The Nokia plugin

Qt Mobility ships with a Maps and Navigation API plugin which accesses the relevant Ovi services provided Nokia. The use of these services is governed by the terms and conditions available in the file plugins/geoservices/nokia/OVI_SERVICES_TERMS_AND_CONDITIONS.txt.

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

Note that accepting the terms and conditions only applies those terms and conditions to the use of the Ovi Maps Services plugin and does not limit the use of the other maps and navigation API plugins that may be included with the Qt Mobility package.

Implementing plugins

A plugin implementer needs to subclass QGeoServiceProviderFactory and as many of the ManagerEngine classes as they want to provide implementations for.

Subclassing QGeoServiceProviderFactory will only involve exposing a name and a version by overriding QGeoServiceProviderFactory::providerName() and QGeoServiceProviderFactory::providerVersion(), and overriding QGeoServiceProviderFactory::createSearchManagerEngine(), QGeoServiceProviderFactory::createMappingManagerEngine() and QGeoServiceProviderFactory::createRoutingManagerEngine() as appropriate.

QGeoMapData Are used as a bridge between QGraphicsGeoMap and QGeoMappingManager
QGeoMapObjectInfo The base class used to define the parts of QGeoMapObject and its subclasses that are specific to a particular QGeoMapData subclass
QGeoMappingManagerEngine Interface and convenience methods to implementors of QGeoServiceProvider plugins who want to provides support for displaying and interacting with maps
QGeoRoutingManagerEngine Interface and convenience methods to implementers of QGeoServiceProvider plugins who want to provide access to geographic routing information
QGeoSearchManager Interface and convenience methods to implementers of QGeoServiceProvider plugins who want to provide support for searching operations related to geographic data
QGeoServiceProviderFactory Factory class used as the plugin interface for services related to geographical information

Tile-based map convenience classes

Most of the current tile based mapping APIs are very similar, and so we provide a number of classes intended to make writing tile based mapping plugins much simpler.

If the Mercator projection and the most common tile addressing scheme is used this will mainly involve subclassing QGeoTiledMappingManagerEngine and providing an implementation of QGeoTiledMappingManagerEngine::getTileImage().

QGeoTiledMapData Subclass of QGeoMapData provided to make working with tile based mapping services more convenient
QGeoTiledMapReply Manages a tile fetch operation started by an instance of QGeoTiledManagerEngine
QGeoTiledMapRequest Represents a request for a map tile from a tile-based mapping service
QGeoTiledMappingManagerEngine Provided to make writing Qt Maps and Navigation API plugins for tiled based mapping services easier
362 page views in the last 30 days.
×