QML Layers in Marble

Categories: KDE, Marble
Tags: No Tags
Comments: Comments Off
Published on: May 27, 2012

KDE 4.9 Beta 1 is about to be tagged soon and so is Marble 1.4 Beta 1. Judging from the current bug reports and my own tests it is pretty stable already; I’m not aware of any major bugs. Still we’re not running short of things to do: There’s Marble Touch for Harmattan (Nokia N9), the to-arrive Marble Touch for Plasma Active as well as the usual development work currently centered around our four students and their projects (Google Summer of Code and Season of KDE).

One of Marble’s strength has always been that the vast majority of all functionality is contained in its library and shared by the two (with Marble Touch now three) applications that are shipped with the project as well as all other applications that embed the library. Given that Marble Touch is based on QML/Qt Components, this implies to expose parts of the API to QML.

The content presented by Marble consists of several layers stacked on top of each other. Usually this is a base map (based on several texture and vector layers), intermediate layers like search results, a route, postal codes, clouds and finally information boxes. Most of them can be configured: The base map is setup by .dgml files and brings it’s own properties that can further be tweaked through e.g. Marble’s interactive legend. Search and routing have their own control fields. Additionally these layers can be managed via the C++ API (and most parts also from QML).

What about postal codes? They’re part of the so-called online services, plugins that download a certain type of data for the currently visible map region and display them. Besides postal codes these can be Wikipedia articles, photos (from flickr), weather status and forecast, recent earthquakes and more. Each of these services provides limited interactivity in the Desktop version, but the QML interface was missing so far. Yet it is quite interesting to access the online service data from QML for those activities that are tightly coupled to them: Weather, Friends and the currently emerging “Around Me” that provides information about nearby places and events.

Today I extended the existing online service framework to be able to provide a QML delegate — pretty similar to a delegate e.g. in a QML ListView. Once the delegate is set it deactivates the QWidget based rendering for the given service. Instead the provided  QDeclarativeComponent is used as a factory to build and destroy QML item instances as needed as well as updating their screen positions automatically. The C++ data model item retrieved by the online service is set as the context object in the QML context of the QML item such that it can easily access its properties by their name. This approach has several advantages: Item culling, filtering and positioning can be done in the C++ part, which is faster, easier and reuses existing code. At the same time the layout can be done in QML, which usually results in less code and easily allows to add animations. And finally QML is great to allow interaction with the content.

For a proof-of-concept I took the existing Weather activity and replaced its C++ rendering with a QML delegate as you can see in the short screencast below (Youtube, direct .webm here). As expected the QML part is short, just 50 lines for the legend on the left and 60 lines for the delegate that renders the weather status icon and temperatures. Adding interactivity (showing details on selection of a weather station, marking stations as favorite) will be similarly easy.

Not everything works great though. The old z-value problem naturally comes up again with the QML weather items overlapping the information boxes (except for the QML rendered legend). This happens because of the different, independent rendering that does not allow to control the paint order. Unless I find a way around this I’ll probably go for replacing the remaining upper layers (information boxes mainly) with QML equivalents as well. That’d mean that the lower part of the layers was rendered by C++, the upper part by QML. On the one hand this sounds sane given that the lower layers need little interactivity, but are performance critical, while the upper ones are the reverse. On the other hand this would break the fine grained z-value control we currently have.


The QWidget based rendering of online service layers in Marble can now be replaced by custom QML delegates (sok-2012-plasma-active branch).



Approaching the World of Tablets

Categories: KDE, Marble
Tags: No Tags
Comments: 4 Comments
Published on: May 6, 2012


Last week I packaged Marble Touch 1.3.3 for the Nokia N9/N950 and submitted it to the Ovi store. It’ll appear there in the next days. Compared to 1.3.2 there are the usual bugfixes and smaller improvements, but also new features — most prominently support for bookmarks.

In retrospect, I’m pretty satisfied with the choice to base its development on Qt Components. While I still have a lot of ideas for improving and extending it, the plan for world domination now wants me to shift attention towards a different, yet similar topic: Bringing Marble Touch to Plasma Active. Fortunately the Plasma guys were clever enough to develop the Plasma Components with a very similar API, so the initial port was an easy task for this rainy weekend. Marble Touch in master now supports both Qt Components and Plasma Components. It’s not polished yet, font and icon sizes need to be adjusted and most dialogs don’t play well yet, but the core functionality is all there and works happily. I even tested it on Kubuntu Active in a virtual machine.

One of the reasons I worked on this now is to set a solid base for Utku (you may remember him as the author of Marble’s earthquake and opendesktop plugins as well as the map creation wizard) to join me in his Season of KDE project. Great news! I’m sure we’ll have a nicely polished, end-user ready Marble Touch for Plasma Active at the end of the summer 🙂

With the technical and organizational stuff mostly covered it’s back to brainstorming: What use cases do we want to cover on tablets? Routing and navigation are fundamental ones on smartphones. They’re also important on tablets, yet their larger screen and different usage patterns (couch mode, second screen) enable further use cases. So the second part of our motto — “find your way and explore the world” — becomes more important. I’m thinking of showing more details about places (photos, weather, user content) arranged in a convenient way. Furthermore owncloud integration would be lovely to easily share/synchronize your bookmarks, routes and photos across devices. What would you like to see?


GSoC 2012: Spread the word!

Categories: KDE
Tags: No Tags
Comments: Comments Off
Published on: March 1, 2012

Something missing in the picture? community.kde.org/GSoC is the place to go both for prospective students and mentors. Please spread the word!

Don’t miss our nice Marble project ideas 🙂

Marble Touch now available in the Ovi Store

Categories: KDE, Maemo
Tags: No Tags
Comments: 8 Comments
Published on: February 2, 2012

Just a quick note: Owners of the Nokia N9/N950 can now install Marble (Touch) from the Ovi Store. Enjoy 🙂

Sisyphus Work

Categories: KDE, Maemo
Tags: No Tags
Comments: Comments Off
Published on: January 30, 2012

The OpenStreetMap database keeps growing nicely. Missing regions are added, details completed and changes to the environment reflected by the very active mapping community.

When using the data — by opening openstreetmap.org or using applications like Marble — you want to use the latest data that is available. For Marble, this includes the monav offline routing data and the offline search databases. Until the end of last year these two data types were updated by me running a couple of scripts manually, downloading a few dozen gigabyte of raw data and transforming it to the right formats, then uploading the final data (around 12 GB).

Doing things manually is tedious and time consuming, so I ended up regenerating the data rather infrequently (say 2-3 times a year). That wasn’t quite the frequency I’d like to have, so at the end of last year instead of doing another manual round I invested the time (and more, of course) to automate the process. Sisyphus was born and after solving the usual initial quirks it is now converting fresh OpenStreetMap offline data for Marble 24/7 since the start of this year. Thanks to Geofabrik for providing the .pbf data sources and Ben Cooksley helping to setup the KDE servers as needed.

A full roundtrip (converting all regions worldwide) takes 7-8 days currently, so you have the option of updating your offline data quite often now…

In Marble on the Desktop: Routing tab => Configure => Monav
In Marble on the Nokia N900: Main menu => Routing => Configure => Monav
In Marble on the Nokia N9/N950: Preferences => Offline Data


Marble Touch – Approaching the First Release

Categories: KDE, Maemo
Tags: No Tags
Comments: 12 Comments
Published on: January 23, 2012

Over the weekend I’ve been working on the last features and polishing for the first release of Marble Touch (Marble on the Nokia N9/N950) at the end of the month. Things are coming together nicely; the first release will even have a navigation activity and newstuff integration although I originally planned to leave them out for the 1.3.0 release. The latest additions are pretty neat as they help you customize Marble Touch to your needs easily without having to copy things manually via USB. Just open the Preferences page from the main view as shown in this screenshot:

The installation of additional voice navigation speakers is quite convenient: The list of speakers you can select among presents the locally installed ones and those available via newstuff in one common list. If you select a speaker that is not yet available locally, it will be installed automatically for you.

The same feature will be available in Desktop Marble 1.4. Another nice newstuff feature is the installation of additional map themes you might already know from Marble’s KDE Desktop version. In a similar fashion you can use it in Marble Touch:

The last piece missing in the puzzle is the installation of offline data (offline routing and offline search) via newstuff. I hope to get that implemented in the next days. Additionally I plan to do a bit more polishing of the Navigation activity, which currently looks like this:

It’s pretty much set now and just some remaining quirks need fixes: The blue and gray background colors from the oxygen palette don’t fit too well with the Harmattan theme, the offline mode icon in the toolbar is not exactly a toolbar icon, the measure tool borders have pixel errors and the distance indicator font is a bit unreadable against the map background. At least most of that is easy to fix.

If you know Marble on the N900 you’ll notice some gradual improvements to its navigation mode: Besides supporting both portrait and landscape mode the information shown is grouped logically on the N9/N950, making it easier to read while giving you more information at the same time. The two toolbar icons are handy shortcuts to quickly mute voice navigation and toggle offline mode.

GCI Goodies: Favorite weather stations

Categories: KDE
Tags: No Tags
Comments: 2 Comments
Published on: January 2, 2012

Earlier I already wrote about some of the nice tasks accomplished by the GCI students for Marble. We’re near the end of Code-In now and thanks to never sleeping Torsten and the busy GCI students an incredible amount of more than 70 (yes, seventy) Marble tasks have been done. Among them are a couple of enhancements to Marble’s weather plugin, all done by Valery Kharitonov: Weather stations from geonames.org are now displayed among the existing services, weather station data is refreshed automatically after a configurable interval and last but not least you can mark weather stations as favorite and only display those as illustrated in the screenshot below. So go grab Marble from master and have your holiday weather always at sight 😉

This year the GCI rules were changed a bit and filing new tasks was only possible at selected times. This cut off the following tasks that I’d like to see as further extensions of Marble’s weather plugin:

  • Favorite weather stations should show more information than non-favorite ones: Forecast data with icons and a larger icon for the current state
  • The data retrieval logic needs some enhancements for the new favorite mode
  • The plugin should be touch-friendly such that toggling stations as favorite and switching between selection and favorite mode is also possible in Marble Touch.

Of course working on that is not bound to GCI. Anyone with some programming background can work on it and I’d welcome any patches in that direction. Drop by in #marble on freenode or send a mail to marble-devel@kde.org if you’re interested…


GCI Goodies: Public Transport Map Theme

Categories: KDE
Tags: No Tags
Comments: 7 Comments
Published on: December 6, 2011

Google Code-In is running and we’re busy mentoring lots of Marble tasks. This year we added many data related tasks: Voice navigation speakers for different languages, OpenStreetMap derived map themes, historic map themes and more. Just like last year the results are pretty awesome and a few of the results are already available for public consumption. Earlier today I uploaded the shiny new Public Transport map theme to our GHNS server. The theme was done by Paul Kocialkowski. It uses the public transport (ÖPNV) map http://openbusmap.org/ created and maintained by Melchior Moos, who kindly allows us the usage within Marble. The map data itself is CC-BY-SA 2.0.

Do you miss your local bus? Please add it to OpenStreetMap. Contributing is easy, see Öpnvkarte for details.

If you’re using KDE 4.5.1 or later with Marble installed, you can install the public transport map theme easily using the “Download Maps” menu entry in Marble. Older KDE versions before 4.5.1 are not supported right now, though if there is a significant number of people who are stuck with older versions for some reasons I can do a version compatible with older versions as well. Please comment in that case.

How would you like your current position?

Categories: KDE, Maemo
Tags: No Tags
Comments: 24 Comments
Published on: December 1, 2011

We’re currently discussing how to give a good visual indicator to users of Marble Touch where their current GPS position is (once it moves outside the visible region of the map). I created a video that shows two possible approaches: The first one (sticky indicator) shows the indicator on the bottom right of the screen and an arrow to point towards it. The second one (moving indicator) also moves the indicator to the nearest border of the screen. Please take a look at the video comparing both and add your comments.

Here are some things to consider:

The sticky indicator has the advantage of a predictable location. Look at the bottom right corner of the map to see the distance to the current position and in which direction it is. A disadvantage is that the distance is measured to the bottom right corner, which is not always intuitive (measuring to the center can be as confusing though). Likewise it’s confusing two see two position indicators when the current position is inside the view. This could be fixed however by hiding the position indicator when the position is visible.

The moving indicator feels a bit nicer as it is just one element and has a visually somewhat more exciting behavior. This could be annoying as well, however. Additionally I’m missing a good idea how to stick the distance label to it (therefore that one is missing in the second part of the video).

Which version to you like better? Which additional suggestions do you have? I’m interested in your opinion!


Introducing Marble Touch

Categories: KDE, Maemo
Tags: No Tags
Comments: 6 Comments
Published on: November 27, 2011

It’s release preparation time again. As most features are fixed by now, this is a good time to show some of the things we’ve been working on lately. There were a couple of blogs about Marble features that will debut in KDE 4.8 / Marble 1.3 already, but I’d like to introduce another one which we didn’t announce properly yet: Marble Touch, a Qt Quick Components based version of Marble built for the Nokia N9/N950. It is centered around different views or activities that align the user interface for common tasks like searching or routing.

The first version is planned for release in about two months. Like all Marble programs it’s based on the Marble library to reuse the vast amount of features it offers. Marble Touch 1.3.0 will come with the following activities: Virtual Globe, Search, Routing, Tracking, Weather, Friends, Space View. See the current state in the Youtube video Marble Touch on the Nokia N950.

You may notice certain glitches in the video — missing icons, missing animations, missing pinch zoom, z-order problems, slow response time. That’s alright for the beta state and we’ll take care of as much as possible until the release. I’d love to see help from a designer or usability person though! If you’re interested, please visit #marble in Freenode or write to marble-devel@kde.org.

After the first release there’ll be feature releases every month. They’ll add features that are currently implemented in the Marble library, but not yet available from the Marble Touch user interface: Bookmark support, guidance mode, voice navigation. In parallel I’d like to work on an Android version of Marble Touch optimized for tablets. A Plasma Active version would be nice as well, but I lack the hardware to play with it.


«page 3 of 7»
Welcome , today is Thursday, October 27, 2016