Quantcast
Channel: Maemo Nokia N900 » native
Viewing all articles
Browse latest Browse all 6

Can you spot what’s new?

$
0
0

361f99f61800x225 Can you spot what’s new?

Yes! Libchamplain now has a scale! It was long overdue. In fact, I first started to work on it way before libchamplain 0.2.2 was even released (1.25 year ago). It got impeded by more important features and bug fixes. Two or three months ago Tollef Fog Heen took over the branch and added the magic required maths to compute the scale. I then took over his work (as he was quite busy and I wanted this too) to provide the final result.

Since all the changes are backward compatible, I’ll soon release a libchamplain 0.4.3 with the scale disabled by default (to ensure the same visual behaviour as before upgrade). To display a scale, an application just has to change the show-scale property to TRUE.

#if CHAMPLAIN_CHECK_VERSION (0, 4, 3)
g_object_set (champlain_view, "show-scale", TRUE, NULL);
#endif

The scale also supports other exotic units than the SI/metric ones. It can display miles and feet, if you’re into that. 52808a621esmile Can you spot what’s new? By the way, the scale will automatically switch from kilometres to metres when it makes more sense. That was quite more complex to do with miles and feet as they are not simply a power of 10. Set the scale-unit property to CHAMPLAIN_UNIT_MILES to get miles.

You can limit the width (in pixels) of the scale with the max-scale-width property.  If you watch closely, the scale will adjust itself right away when you move the map.

e55f252fb750x150 Can you spot what’s new? 7500991ee950x150 Can you spot what’s new? 644c9825de50x150 Can you spot what’s new?

2010-01-04 18:39 UTC with score 1

Viewing all articles
Browse latest Browse all 6

Trending Articles