NavSlight
This page introduces a simple Qt-program called
Note
Changing between these views happens by pressing the "Flip"-button at
the top of the view. The map is rotated based on the baring between
the current and previous location. As you can see the UI is not that complicated and needs a lot of
improvement.
The "Update Pos"-button is used to get the images for the
new location. In other words the navigator does not follow the
location changes constantly. When the "Options"-button is pressed the program gives
the user a option to select the source for the map imagery. At this
stage of development only service available is Google.
The program has also been tested on mobile-phone simulator in which case the bare bone UI makes little bit more sense. Here is a screen shot of the program running in Nokia-simulator showing the map at the default GPS-location.
Details of implementation and current status
The program, just like this web page, is very much work in progress. For example, errors in the image download are not handled very well. The main user interface was implemented with QML which made possible the fluid animation changes between different views. Obtaining position information is done in C++ using Qt Mobility - classes. The images are provided to the QML using a implementation of the QDeclarativeImageProvider-class. In practice this means that in the QML side I can just write something like
source:"image://google/62,13,17,mobile"
}
to show the map image at the location (62,13) at zoom level 17. Same thing for the satellite image would be
source:"image://google/62,13,17,satellite"
}
Naturally this makes updating the QML properties from C++ much easier. The real benefit is that the actual source of the information is hidden. Same UI could easily, with some programming skills, be used to obtain data from other web sources or e.g. from the georeferenced aerial photographs in the file system. If one is interested only in the webview based implementation then the easiest way to do it was explained in class .
The current version: not even alpha
To download the tar+gzip version follow this link .
Helpful links
Discussion on the QDeclarativeImageProvider-class can be found in. this blog
The lecture notes in the Qt-course are also helpful and they can be found under . Mobile Linux Development with QT