You can now roll nice maps with the google Chart api (http://code.google.com/apis/chart/#maps), and I've attached a patch that adds this to the Drupal chart API.
Arguments are #countries (an array of ISO country codes (ISO 3166-1 codes listed on http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country...)) and #georange, a string being "africa, asia, europe, middle_east, south_america, usa and world. Chart type is 'CHART_TYPE_MAP'.
To include a chart use the following code. A views plugin for this would be really useful ;) Oh and maybe an input filter as well.

   $chart = array(
      '#chart_id' => 'test_chart',
      '#type' => CHART_TYPE_MAP,         //Map Type
      '#countries' => array(MG,KE,TN),   //Array of ISO country codes (2 letter codes)
      '#georange' => africa,                    //Geographic Range of the Map - continent name or 'world'
      '#data' => array(10,50,100),        //Value affects intensity of colours which will be in the range defined by #data_colours second and third elements
      '#data_colors' => array('ffffff', 'edf0d4', '13390a') //3 values for the colour (all other countries, start colour and end colour)
    );
echo chart_render($chart);

creates this map of Africa with Madagascar, Kenya and Tunisia hilighted.

CommentFileSizeAuthor
chart.patch853 byteskehan

Comments

tjholowaychuk’s picture

Status: Needs review » Fixed
kehan’s picture

Status: Fixed » Closed (fixed)

Thanks