Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4056420
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:49:31+00:00 2026-05-20T14:49:31+00:00

I’m trying to use a geomap using 2 color schemes. the user will click

  • 0

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.

i would change

options['colors'] = [0xbaecc7, 0x3bc75f]; // light to dark green

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 drawMap by calling setOnLoadCallBack

google.setOnLoadCallback(drawMap);

Any help or ideas would be appreaciated!

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);
                            }
            );

        };
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T14:49:32+00:00Added an answer on May 20, 2026 at 2:49 pm

    After a chance edit in my code I found the problem!!!

    I was using the link <a href="" onclick="drawGoalsMap()">Goals</a>

    I changed it to exclude the href=""

    <a onclick="drawGoalsMap()">Goals</a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.