Planet maemo: category "feed:c8aedd4fc8e6e1aebb347f582e7ee195"

Pierre-Luc Beaudoin

libchamplain 0.3 released!

2009-05-05 02:41 UTC  by  Pierre-Luc Beaudoin

I am proud to announce the release of libchamplain 0.3, the first development release toward 0.4.  libchamplain is a map widget.  It is the work of many months (as far as November) and many contributors since FOSDEM.  Here is a short list of what you get:

  • Support for proxies
  • Support for custom map sources
  • A way to list the available map sources
  • Support for 2 new built-in map sources: Cycle Map and Osmarender
  • A bunch of new function to allow more control on the UI
  • A nicer, more flexible Marker API
  • Nicer default markers: they are now grey, have rounded corners and cast a shadow!
  • Notification when the view is loading content and when it’s done
  • Support for locking down available zoom levels
  • A more intelligent cache that can be purged
  • Bindings (in the works): Perl, Python, C# and C++

Of course being a development release, the API isn’t entirely stable yet.  For instance, the code surrounding the ChamplainMapSourceDesc introduced this weekend is subject to be reviewed in the next weeks.

Yet, this release is a big step forward introducing a lot of the desired features while leaving some for an upcoming release (such as the ability to draw lines on the map).

You can grab the tarball or clone the source code.  You can read the NEWS or read about the API.

On a side note, libchamplain as been officially proposed as an external dependency for GNOME 2.28.

Categories: Gnome
Pierre-Luc Beaudoin

Writing a nice API: comments needed

2009-04-27 00:24 UTC  by  Pierre-Luc Beaudoin

In the race to the 0.3 development release, we are reviewing the API to see it is nice to use, bindable and most of all intuitive to g* coders.  But sometimes, it is hard to find out how to do it well: comments on this particular issue would be appreciated.

ChamplainView is the map view that displays the map.  It needs a ChamplainMapSource from which it gets the map.  There are specialised objects that inherit from ChamplainMapSource such as ChamplainNetworkMapSource and the upcoming ChamplainLocalMapSource (or what ever it will be named by the end of the SoC).

champlainNetworkMapSource* champlain_network_map_source_new_full (const gchar *name,
    const gchar *license,
    const gchar *license_uri,
    guint min_zoom,
    guint map_zoom,
    guint tile_size,
    ChamplainMapProjection projection,
    const gchar *uri_format);

As you don’t want to fill all this information each time you create a new map source, libchamplain currently provides helper constructions:

ChamplainMapSource * champlain_map_source_new_osm_mapnik (void);
ChamplainMapSource * champlain_map_source_new_osm_cyclemap (void);
ChamplainMapSource * champlain_map_source_new_osm_osmarender (void);
ChamplainMapSource * champlain_map_source_new_oam (void);
ChamplainMapSource * champlain_map_source_new_mff_relief (void);

We think it could be interesting to replace these by a Factory to which you pass an enum value to get the constructed ChamplainMapSource.  You would probably be able to add your own map source constructor (as you can implement your own map sources).  You would probably be able to get the list of available map source too.

The question is: is this overkill? the best way to do it? is there something similar in glib or gtk to get inspired from? We base most of the API decisions by looking at other Gtk+ widgets, but this particular object seems to be a different case.

We are asking for your ideas.

Categories: Gnome
Pierre-Luc Beaudoin

libchamplain has got a SoC project

2009-04-21 01:08 UTC  by  Pierre-Luc Beaudoin

There will be a Google Summer of Code project for libchamplain - your Clutter based Map Widget for your Clutter or Gtk+ based applications. This project will be realized by Simon Wenner.  He will be working on getting the map rendered locally (using OpenStreetMap xml data) as opposed to downloading the pre-rendered tiles as libchamplain currently does.  At the end of the summer, libchamplain will support both for best flexibility.

This functionality means a lot of possibilities for libchamplain: better accessibility, smaller bandwidth needs, smaller cache footprint, more context data and finally themable maps.  These can be very useful if you are running on different platforms such as Maemo 5 or a desktop: bigger fonts, more contrast, tango colors!

(oh and by the way, this is the new default markers: more on them in a later post)

Unfortunately, another very interestant SoC idea didn’t make it to selected list: a glib based OSM data API.  That would have made it very useful to access the downloaded data.  But hey, that will be for later!  Thanks to all the students that submitted a project idea on libchamplain :-)

Categories: Gnome
Pierre-Luc Beaudoin

Some libchamplain love

2009-03-22 09:42 UTC  by  Pierre-Luc Beaudoin

libchamplain is a map widget for your application.

I’ve just tagged some bugs or enhancements with the gnome-love keyword.  If you ever wanted to contribute to libchamplain, I think these bugs should be rather simple to fix/implement.

In other news, I selected a list of bugs and features that needs to be fixed before a 0.4 release is made.   Such a release will happen before Gnome 2.28 as I plan to ask to be an external dependency (as Empathy, Eog-plugin and f-spot will have use for it).  The list of bugs is listed in on the mailling list.

Libchamplain is part of Gnome’s Google Summer of Code.  There are already some libchamplain ideas. These ideas are planned for 0.6 release, but the work need to start this summer! Students: apply!

Yes, you did read f-spot! Anders Mørk-Pedersen started a f-spot plug-in to display the geolocation information of your photos!  It even works with multiple selected photos.  Now the poor Anders is so busy with school that it is stuck in a demo state. Anyone interested to help should ping us about it!  libchamplain in f-spot was made possible by Stephane Delcroix’s hard work both to libchamplain’s bindings and clutter’s.

Along the python and managed bindings, perl bindings have been announced.  Emmanuel Rodriguez is writing them with support from the perl community. He’s also contributing unit tests in perl.  These have already proven to be quite useful!

Finally, I decided to give it a try and create a website and logo for libchamplain.  I quickly made the site by borrowing Cheese’s website hehe. The logo represents a jigsaw puzzle piece of a world map as libchamplain is a module to add to existing applications to add maps. I tried to tango-ify it as much my capabilities allow me, if you have a better touch here’s the svg.  Since I have so much use for The Gimp and Inkscape, I donated to the Libre Graphics Meetup!

That was a short résumé of what happened in libchamplain recently, excluding the 53 files changed, 3591 insertions and 1165 deletions.

Categories: Gnome
Pierre-Luc Beaudoin

Familiar Faces

2009-03-09 08:41 UTC  by  Pierre-Luc Beaudoin

I think Facebook fixed their “People you may know” feature, because recently it was showing people I didn’t really know but this morning I knew the listed names and faces and among these:


(Not an actual screenshot, edited to remove non FOSS people)

Now, it is not as if I could be friend with them - after all I know their name/face because we attended the same conferences or read Planet Gnome.  I don’t want to be that excessive Facebook-friend-adder.  I personally draw the line by asking myself “Would that person know/remember who I am?”, therefore I try to only add people that I’ve talked with in real life.

Facebook chose the word Friend to identify the persons I allow to see my information.  It is a rather strong word because some of the people in my “friend” list are just acquaintances and they mix with my best friends!  Yet, they are people I’d like to keep informed about.

Thanks Facebook for forcing me to think about what defines friendship before breakfast ;-)

Categories: Gnome
Pierre-Luc Beaudoin

libchamplain progress in Febuary

2009-02-25 20:52 UTC  by  Pierre-Luc Beaudoin

After this (IMHO) successful presentation at FOSDEM, people spontaneously offered their help.  Many more showed their interest into the ideas or to use it.  Let’s see what is developing from that.

For the new readers, libchamplain is a Clutter based map displaying widget.  It intends to be a light embeddable map widget for all applications with nice eye candy.  For instance, the current API concentrates on how to draw markers and display maps rather than parsing raw GPX data.

Some days before FOSDEM, work started on libchamplain 0.3.  This version will be the development version leading to libchamplain 0.4 (kind of using the same numbering schema than Clutter).  Along with all the promised features (routes, custom map sources and being bindings friendly), this version will have a better code base.  It is already much cleaner than the 0.2 series, and yet a lot of work is left to be done.  I had written a MVC version of the code and I am slowly merging this work (from the MVC branch) back into master.  Also, one of the biggest change is that libchamplain and libchamplain-gtk are now under the same git tree.  Packagers will hate us a little now, but it should provide simpler to maintain in the future.  All bindings will also be under the same tree, in the bindings directory.

There is a new demo portraying an animated marker. See demos/animated-marker.c.

Anders Mørk-Pedersen has been around before FOSDEM working on managed bindings for libchamplain.  With Stéphane Delcroix special touch, they got them running.  They are merged, and I think, ready to be tested.  Now, I am not telling you yet what those bindings are going to be used for…  ;-)

Denk Padje offered his help working on the python bindings.  While we got somethings to generate, neither of us are python specialist.  We could use some help.  The branch is bindings-python.  Once the bindings are running, examples will be written.

Libchamplain could certainly profit from Google’s Summer of Code.  Ideas such as having map drawn locally from raw map data and supporting more map sources and map projections (at least one that doesn’t make Greenland the size of South America) will probably be added to Gnome’s pool of ideas.

Now that we have a mailing list, I think a proper web site should come next.  I would also like the project to have a neat logo.  But nothing too fancy as it is a library after all.  May be someone could come up with something like likes of Geoclue’s logo, but may be as a puzzle piece (clearly indicating that it is a library).  Also, I like the Tango colors ;-)

That’s it for Febuary.

Categories: Gnome
Pierre-Luc Beaudoin

Bringing geolocation into Gnome

2009-02-08 15:46 UTC  by  Pierre-Luc Beaudoin

This week-end, I presented a talk at FOSDEM about how “Bringing geolocation into GNOME”.  While giving some background definitions and ideas for geolocation, it mostly covered what are technologies currently available to achieve these goals.

I have the impression that the talk was well received, it certainly boosted my interest into spending long nights infront of the screen pushing libchamplain forward much more!

Bringing geolocation into GNOME

All of the demonstrated code is already available.  For EOG plugin, see the EOG-plugins svn repo, a release should be available in the Gnome 2.28 timeframe.  For the Empathy Geolocation, it is available in my empathy repo, and the telepathy parts already have been released.  This feature should be merged first thing in the 2.27 development cycle, allowing a smooth testing period before 2.28.  As for Emerillion, it was the first public mention of this promizing application.  It shall be announced in a close future.

To make this presentation, I used clutter-toys/opt, a clutter based presentation tools.  The slides are defined in a xml file.  I enhanced it to support embedded maps.  So if you add the following xml code, you’ll have an interactive map of Brussels, with very usefull places marked, right into your slide! Grab the branch into my clutter-toys repo.

<map width="600" height="500" zoom-level="13" latitude="50.84" longitude="4.37">
      <marker latitude="50.842966" longitude="4.35153">Porte Noire</marker>
      <marker latitude="50.845127" longitude="4.349878">Mannequin Pis</marker>
      <marker latitude="50.848548" longitude="4.353633">Délirium Café</marker>
      <marker latitude="50.821391" longitude="4.39393">Université Libre</marker>
Categories: Gnome
Pierre-Luc Beaudoin

Empathy: where are you?

2009-01-23 03:13 UTC  by  Pierre-Luc Beaudoin

As announced today at, Empathy will soon support publishing your physical location to your contacts, and reading your contact’s location.  This feature has been developed over the past months by Alban Crequy, Daffyd Harries and myself.  While the first version will be limited to automatic location discovery with Geoclue, future versions will allow more parameters and settings.

This feature allows you to publish your location (including complete address, latitude and longitude) to the contacts on your contact list only.  Of course, the level of detail can be tuned and limited.  The information is published using the XMPP protocol using XEP-0080.  To make a long story short, your XMPP server will need to support PEP.  Turns out that pretty much everyone but Google Talk supports it: you will still be able to receive your contact’s location, but your location won’t be published.

All clients implementing this XEP will be able to display your location.  Empathy will display your contacts location on a map using the map widget provided by libchamplain.

This feature will allow you to stay in touch with you friends, knowing where they are, and possibly, how late they’ll be at the restaurant!

Now the technical details. Upon startup, empathy will setup Geoclue to get your current position.  Geoclue will try to figure your location using all the resources you specified (among network, cell, GPS).  Upon connection, Empathy will send that information.

When you are receiving location information from your contacts, it will be stored until you decide to access that information.  Upon displaying the map view, if the information doesn’t contain a latitude and a longitude, Empathy will use Geoclue to geocode the user’s location.  Geocoding is converting a street address to a latitude, longitude pair.

Make sure you attend the “Bringing geolocation into Gnome” talk at FOSDEM 2009.

Categories: Gnome