×
Namespaces

Variants
Actions
(Difference between revisions)

Qt Maps Examples

From Nokia Developer Wiki
Jump to: navigation, search
jaaura (Talk | contribs)
m
jasfox (Talk | contribs)
m (Jasfox - Add link.)
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Qt]]
+
[[Category:Qt Mobility]][[Category:Nokia Maps]][[Category:MeeGo Harmattan]][[Category:Symbian]]
These examples are built with currently available public tools. The work is under more enhancement for the given examples. Some examples may not work due to the bugs. You may look into the bug report for the avaiable fix.  
+
{{ArticleMetaData
 +
|sourcecode=[[Media:HelloMap.zip | HelloMap.zip]] [[Media:SimpleMap.zip | SimpleMap.zip]] [[Media:SimpleMap2.zip]] [[Media:MapInteraction.zip | MapInteraction.zip]] [[Media:SimpleMapContent.zip | SimpleMapContent.zip]] [[Media:MoreMapContent.zip | MoreMapContent.zip]] [[Media:MapMarkers.zip]] [[Media:MapAreaSelector.zip]] [[Media:DynamicPolyline.zip]] [[Media:GeoCodeMap.zip | GeoCodeMap.zip]] [[Media:ReverceGeoCode.zip | ReverceGeoCode.zip]] [[Media:MapSearch.zip | MapSearch.zip]] [[Media:SimpleRouting.zip | SimpleRouting.zip]] [[Media:MyLocationMap.zip | MyLocationMap.zip]]
 +
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
 +
|devices=Nokia N8, Qt Simulator
 +
|sdk=[http://www.developer.nokia.com/info/sw.nokia.com/id/e920da1a-5b18-42df-82c3-907413e525fb/Nokia_Qt_SDK.html Qt SDK] v1.0.2
 +
|platform= <!-- Compatible platforms - e.g. Symbian^1 and later, Qt 4.6 and later -->
 +
|devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) -->
 +
|dependencies=Qt Mobility 1.1.1 and Qt 4.7.2
 +
|signing=<!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer -->
 +
|capabilities=<!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
 +
|keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase -->
 +
|id= <!-- Article Id (Knowledge base articles only) -->
 +
|language=<!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 +
|review-by=<!-- After re-review: [[User:username]] -->
 +
|review-timestamp=<!-- After re-review: YYYYMMDD -->
 +
|update-by=<!-- After significant update: [[User:username]]-->
 +
|update-timestamp=<!-- After significant update: YYYYMMDD -->
 +
|creationdate=20110303
 +
|author=[[User:Symbianyucca]]
 +
}}
 +
{{SeeAlso | [http://developer.here.net/qt Maps API for Qt]}}
 +
These examples are built Qt SDK released on March 1st 2011, i.e. they are tested with Qt Mobility 1.1.1 and Qt 4.7.2, as well as examples tested only with the SDK's simulator and N8 device. The work is under more enhancement for the given examples. Some examples may not work due to the bugs. You may look into the bug report for the available fix.  
  
 
Anyway, with some of the examples, do also note the bug [http://bugreports.qt.nokia.com/browse/QTMOBILITY-841 QTMOBILITY-841] that prevents selecting map items on some zoom levels.
 
Anyway, with some of the examples, do also note the bug [http://bugreports.qt.nokia.com/browse/QTMOBILITY-841 QTMOBILITY-841] that prevents selecting map items on some zoom levels.
  
 
Also for some reason I did not get gestures working, thus no fancy zooming available yet.
 
Also for some reason I did not get gestures working, thus no fancy zooming available yet.
 +
 +
Similar examples for QtQuick [[QtQuick Maps Examples]] wiki article, and examples examples for Windown phone using Bing maps can be found from [[Maps Examples for Windows phone]] wiki article
 +
 +
[[Maps Examples for Nokia Maps API]] wiki article also has same use cases implemented with the Nokia Maps API for Web.
  
 
= HelloMap =  
 
= HelloMap =  
Line 22: Line 47:
 
This is a simple map example added with kinetic panning
 
This is a simple map example added with kinetic panning
  
The example is available at [[Media:SimpleMap2.zip | SimpleMap2.zip]]
+
The example is available at [[Media:SimpleMap2.zip|SimpleMap2.zip]]
  
 
= MapInteraction =  
 
= MapInteraction =  
Line 50: Line 75:
 
This example shows different ways on using and loading images to the QGeoMapPixmapObject as well as general marker handlings.
 
This example shows different ways on using and loading images to the QGeoMapPixmapObject as well as general marker handlings.
  
The example is available at [[Media:MapMarkers.zip | MapMarkers.zip]]
+
The example is available at [[Media:MapMarkers.zip|MapMarkers.zip]]
  
 
= MapAreaSelector =  
 
= MapAreaSelector =  
Line 56: Line 81:
 
This is an example showing how you can make simple rectangle & circle area selectors. These selectors are used with Geo coding & search examples.
 
This is an example showing how you can make simple rectangle & circle area selectors. These selectors are used with Geo coding & search examples.
  
This is example is available at [[Media:MapAreaSelector.zip | MapAreaSelector.zip]]
+
This is example is available at [[Media:MapAreaSelector.zip|MapAreaSelector.zip]]
  
 
= DynamicPolyline =
 
= DynamicPolyline =
Line 62: Line 87:
 
This example shows dynamic polyline handling via touch events. Polyline points can be added by clicking on the map and removed by clicking on the marker showing the polyline points already added.
 
This example shows dynamic polyline handling via touch events. Polyline points can be added by clicking on the map and removed by clicking on the marker showing the polyline points already added.
  
The example is available at [[Media:DynamicPolyline.zip | DynamicPolyline.zip]]
+
The example is available at [[Media:DynamicPolyline.zip|DynamicPolyline.zip]]
  
 
= GeoCodeMap =
 
= GeoCodeMap =

Revision as of 12:54, 14 January 2013

Article Metadata
Code ExampleTested with
SDK: Qt SDK v1.0.2
Devices(s): Nokia N8, Qt Simulator
Compatibility
Platform(s):
Symbian
Dependencies: Qt Mobility 1.1.1 and Qt 4.7.2
Article
Created: symbianyucca (03 Mar 2011)
Last edited: jasfox (14 Jan 2013)
See Also

These examples are built Qt SDK released on March 1st 2011, i.e. they are tested with Qt Mobility 1.1.1 and Qt 4.7.2, as well as examples tested only with the SDK's simulator and N8 device. The work is under more enhancement for the given examples. Some examples may not work due to the bugs. You may look into the bug report for the available fix.

Anyway, with some of the examples, do also note the bug QTMOBILITY-841 that prevents selecting map items on some zoom levels.

Also for some reason I did not get gestures working, thus no fancy zooming available yet.

Similar examples for QtQuick QtQuick Maps Examples wiki article, and examples examples for Windown phone using Bing maps can be found from Maps Examples for Windows phone wiki article

Maps Examples for Nokia Maps API wiki article also has same use cases implemented with the Nokia Maps API for Web.

Contents

HelloMap

This is a simple map without any additional code. It simply showing a map without interaction possibilities.

The example is available at HelloMap.zip

Simple map

Hello world map example which has simple panning included in it.

The example available at SimpleMap.zip

Simple map 2

This is a simple map example added with kinetic panning

The example is available at SimpleMap2.zip

MapInteraction

This example shows how to zoom the map, changing map type, moving to coordinates and getting current coordinate from the map.

The example is available at MapInteraction.zip

SimpleMapContent

This example shows adding & removing markers, polyline & polygon. Toggling visibility, using z-ordering and zooming to map objects

Please note that zooming works well on simulator but not on Symbian target device. There is a bug reported at QTMOBILITY-876.

The example is available at SimpleMapContent.zip

MoreMapContent

This example shows how to handle circle, rectangle & text map objects with the map.

Please note that zooming works well on simulator but not on Symbian target device. There is a bug reported at QTMOBILITY-876.

The example is available at MoreMapContent.zip

MapMarkers

This example shows different ways on using and loading images to the QGeoMapPixmapObject as well as general marker handlings.

The example is available at MapMarkers.zip

MapAreaSelector

This is an example showing how you can make simple rectangle & circle area selectors. These selectors are used with Geo coding & search examples.

This is example is available at MapAreaSelector.zip

DynamicPolyline

This example shows dynamic polyline handling via touch events. Polyline points can be added by clicking on the map and removed by clicking on the marker showing the polyline points already added.

The example is available at DynamicPolyline.zip

GeoCodeMap

This is example of Geo coding that shows how you can find positions for address. This example also shows how a rectangle area selector could be used inside a dialog.

Geocoding without any area will not work on device. The bug report can be found from QTMOBILITY-1371

The example is available at GeoCodeMap.zip

ReverceGeoCode

This is an example of simple reverse geo coding which shows how you can get address details of a geo position.

The example is available at ReverceGeoCode.zip

MapSearch

This example shows how you can use the search. It also shows how to use a circle area selector with the search.

Currently the API appears not to give any results, and there is a bug report for this at QTMOBILITY-1372.

The example is available at MapSearch.zip

SimpleRouting

The example shows simple two-point routing without actually doing anything on the route segments etc. The example is having two Draggable markers for start & stop points and then showing the returned route object on the map.

The example is available at SimpleRouting.zip

MyLocationMap

This example shows how to get and monitor location of the device and show it on a map, as well as shows usage of the QGeoAreaMonitor. It also uses circle area selector with the area monitor.

There is a known bug QTMOBILITY-1059 and with devices the QGeoAreaMonitor does not work, since it is null.

The example is available at MyLocationMap.zip

375 page views in the last 30 days.