I am glad that I accomplished my first task to integrate political map with marble. :) . I finished its implementation last week.
The main feature I implemented is the support to specify different colors for different regions of map in .dgml file ( theme file for Marble ) . So, if the placemarks in map data file contains color indices then the placemarks are assigned different fill colors based upon the color index they have. The different color indices of placemarks are mapped to the colors you specify in theme file. Political map uses the same logic. So, one can customize the colors with which the countries are being colored by specifying the custom colors in theme file. Further to achieve this I also modified the pn2 format ( a memory efficient format that Marble uses to store map data ) to store color indices in it
Other than this I fixed the issue of correctly determining inner and outer boundary of a polygon. I found this problem when I noticed that some of the countries are not being displayed on map and I need to zoom in to see them. This was the most challenging thing in whole task to figure out why it’s happening. At last I tracked down this weird problem and fixed it. Meanwhile I also designed a patch for not parsing the map data file again on theme change ( if it has been parsed already ) if the new theme just changes the fill color or pen color, instead just change the style info of placemark.
Currently you can browse through political map and get basic information ( like population, some basic history, area, flag etc. ) about a country by clicking on its name. The image below displays the information about Egypt :
So, continuing my work this week I started working on highlighting a particular region on map when you click on it. I have designed an initial patch for it. Tosten and Dennis gave it a quick review and suggested me some changes. So, I need to fix them all first. Anyways, here is a quick view what it looks like ( Italy has been highlighted image below ) :
So, I’ll be busy this week fixing the issues with ‘highlight on click’ patch. Stay tuned as more interesting feature to come ahead :-) .