×
Namespaces

Variants
Actions
(Difference between revisions)

Qt Location API

From Nokia Developer Wiki
Jump to: navigation, search
hbattke (Talk | contribs)
hbattke (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 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>
  
QGeoBoundingBox
+
=== Mapping ===
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:
+
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
 
 
 
== Licensing and business model options ==
 

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

  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.

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
317 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×