GSoC/GCI Archive
Google Code-in 2013 KDE

Open Geo URIs with Marble

completed by: Levente Kurusa

mentors: Torsten Rahn, Dennis Nienhüser

A 'geo' URI is a URI scheme defined by the Internet Engineering Task Force's RFC 5870, see http://en.wikipedia.org/wiki/Geo_URI. This task is about installing Marble as a handler for such URIs. Clicking on a link like geo:37.786971,-122.399677 will then open Marble at the given location.

  • Have a look at the bug report 329512. It contains an initial implementation for that feature
  • Create a class GeoUriParser with a method bool parse( const QString &uri ). It should return true iff the given string is a valid Geo URI. Use the regular expression from the initial patch to implement this. Store the coordinate parsed in a member variable. Create a method GeoDataCoordinates coordinates() const in GeoUriParser which returns this member variable.
  • Change kdemain.cpp to support --geo-uri parameters like in the initial patch, but make it use the new GeoUriParser. Check your implementation by opening Marble like
    marble --geo-uri=geo:-25.0064,153.359,250
    You should end up on Fraser Island with this one (Great Sandy National Park in Queensland, AU)
  • Add the same feature (handling a --geo-uri parameter) to the Marble Qt application and test that it works in the same way
  • Create a file marble.protocol in src/apps/marble-kde and have cmake install it appropriately in the KDE services directory. See how marble_part.desktop is installed. The content of the file should be identical to this one, but with the exec path fixed (no path needed, just marble). If you find documentation about .protocol files, check the other fields and adjust as needed
  • Create a unit test tests/GeoUriParserTest. Provide a couple of valid and invalid geo URIs and check that they are parsed/rejected correctly
  • Create a review request