title: How to display a Geomap in different colors from external click using JS
body: <p>I'm trying to use a geomap using 2 color schemes. the user will click a link on the page and then, using js, i will change the color of the map and redraw it. </p>
  
  <p>i would change </p>
  
  <pre><code>options['colors'] = [0xbaecc7, 0x3bc75f]; // light to dark green
  </code></pre>
  
  <p>The problem is that every time i call the function to redraw it seems to reload the geomap. I have two functions.. the one below is for green and the otherone is for drawing the blue map.
  At the start i draw the blue map using <code>drawMap</code> by calling <code>setOnLoadCallBack</code></p>
  
  <pre><code>google.setOnLoadCallback(drawMap);
  </code></pre>
  
  <p>Any help or ideas would be appreaciated!</p>
  
  <pre><code>function drawGoalsMap() {
              var options = {};
              options['dataMode'] = 'regions';
              options['region'] = 'world';
              options['colors'] = [0xbaecc7, 0x3bc75f]; // light to dark green
              options['width'] = '900px'; 
              options['height'] = '400px';
  
              var data = new google.visualization.DataTable();
              data.addRows(6);
              data.addColumn('string', 'Country');
              data.addColumn('number', 'Messages');
              data.setValue(0, 0, 'Germany');
              data.setValue(0, 1, 200);
              data.setValue(1, 0, 'United States');
              data.setValue(1, 1, 300);
              data.setValue(2, 0, 'Brazil');
              data.setValue(2, 1, 400);
              data.setValue(3, 0, 'Canada');
              data.setValue(3, 1, 500);
              data.setValue(4, 0, 'France');
              data.setValue(4, 1, 600);
              data.setValue(5, 0, 'RU');
              data.setValue(5, 1, 700);
  
              var container = document.getElementById('map_canvas');
              var geomap = new google.visualization.GeoMap(container);
              geomap.draw(data, options);
  
              google.visualization.events.addListener(geomap, 'regionClick', 
                  function(e) {
                                  var countryCode = e['region'];
                                  DrillDown(countryCode);
                              }
              );
  
          };
  </code></pre>