screenshots (click to zoom)
QMapControl running on the Neo
QMapControl running under linux
Data from WMS server
A Demoapplication
QMapControl 0.9.5.1
QMapControl is a Qt/Qtopia widget which enables your (mobile) applications to use map data. Simply add the widget to your application, have a look at the API and start developing a fancy geospatial (mobile) application.
With QMapControl you can use different map providers, like OpenStreetMap or several WMS-Server. Then you can modify the view of your QMapControl, writing a location based application when having a GPS receiver or just browse the maps. It is possible to have more than one layers, so you can mix maps from different servers. To enrich the maps you can draw your own object to coordinates.
Feature list:
- Compatible with multiple map providers (Tile server and WMS server)
- Draw custom objects into maps (lines, points, images, even other Qt widgets!)
- Objects can be added to any coordinate
- Control elements can be added to QMapControl's layout
- Added objects emit signals on clicks
- The map navigation is customizable (using styles and/or keys)
- GPS parser included for reading gllin output
- Tested on the FIC Neo1973 and Trolltech Greenphone (and Linux/Windows)
- Map tiles can be stored persistently
What's next?
- Rotating maps
Download
Download sourcecode including sample applications and documentation
Download sample application binaries - i386/Qt 4.3.2
Download sample application binaries - ARM Neo/Qtopia 4.2.4
Download sample application binaries - Win32/Qt 4.4.1 (Qt libs included)
View the API
View my diploma thesis about QMapControl (german)
For more up to date sources checkout the SVN from sourceforge
Sample code preview
// create MapControl mc = new MapControl(QSize(480,640)); // create MapAdapter to get maps from MapAdapter* mapadapter = new OSMMapAdapter(); // create a map layer with the mapadapter Layer* l = new MapLayer("Custom Layer", mapadapter); // add Layer to the MapControl mc->addLayer(l);
Complete sample applications: here
Version history
- 2008-09-21: version 0.9.5.1: Minor changes: limiting zoom to not exceed min and max borders, showScale caused crash if zoom was out of range
- 2008-06-11: version 0.9.5: new method "enablePersistentCache()" allows to store map tiles, new method "showScale(bool)" allows to display the scale of the current map, license changed to LGPL
- 2008-04-03: version 0.9.4: removed "get" prefixes from ancessor functions, to improve Qt-like design,
renamed event "geometryClickEvent()" to "geometryClicked()",
renamed event "draggedRect()" to "boxDragged()" - 2008-01-13: Source refactored, several bugfixes
new demoapplication: Citymap - 2007-12-29: bug fixed: widgets were not displayed correctly in the maps
new feature: a yahoo map adapter is available - 2007-12-26: bug fixed: wrong locale settings which caused false WMS-requests.
new feature: objects can be resized depending on zoom level - 2007-12-04: initial version 0.9
Contact
On questions, ideas or problems please contact me kaiwinter@gmx.de
License information
This software is released under LGPL. Please review the licenses of the map providers you are using. I would recommend using OpenStreetMap, since their map data is released under Creative Commons.
QMapControl in action
- Merkaartor: A Qt map editor
- Open Citymap: A Qtopia mapping application
- QNetAddressBook: An addressbook to store wireless networks and display them into a map