title: How to event listen and programatically highlight specific regions of my India map?
body: <p>I want the map of India and the list with text for the regions to listen to each other so that when the mouse pointer is hovering above a region then the corresponding region name gets underlined, and similarly if I hover over the name of the region to the left then the corresponding area on the map should be highlighted with the pink color. Can you help me? I can add code to listen for the hover event, but I'm not sure how to programmatically highlight the regions?
  I can listen for clicking on a region and clicking on a region name but how do I programatically highlight the corresponding region when selecting the text?</p>
  <p><img src="https://i.stack.imgur.com/Rqb33.png" alt="enter image description here" /></p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
    &lt;head&gt;
      &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt;
      &lt;meta charset=&quot;UTF-8&quot;&gt;
      &lt;meta name=&quot;keywords&quot;
            content=&quot;Houses Apartments, Vacation homes, Offices, Land, Flatmates,Paying Guest, Other real estate, Cars, Motorcycles, Accessories  parts, Trucks, Other vehicles, Home  Garden, Clothing, For Kids (Toys  Clothes), Jewelry  Watches, Hobbies, Sports  Bicycles, Movies, Books  Magazines, Pets, Tickets, Art  Collectibles, Music  Instruments, Computers  Accessories, TV, Audio, Video, Cameras, Cellphones  gadgets, Video games  consoles, Job offers, Resumes, Services, Classes, Professional,Office equipment, Other,  &quot;&gt;
      &lt;meta name=&quot;description&quot;
            content=&quot;Find jobs, cars, houses, mobile phones and properties for sale in your region conveniently. Find the best deal among {{count}} free ads online!&quot;&gt;
  
      &lt;title&gt;Free classifieds in India - Koolbusiness.com&lt;/title&gt;
  
      &lt;link href=&quot;/static/css/koolindex_in.css?0.238133053892&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;
      &lt;script type=&quot;text/javascript&quot; src=&quot;/static/js/jquery-1.10.2.min.js?0.238133053892&quot;&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  {% include &quot;kooltopbar.html&quot; %}
  
      &lt;script type='text/javascript' src='http://www.google.com/jsapi'&gt;&lt;/script&gt;
      &lt;script type='text/javascript'&gt;
  
  
          function drawMap() {
   var data = google.visualization.arrayToDataTable([
             ['Province'],
          ['Goa'],
          ['Gujarat'],
  
           ['Andhra Pradesh'],
  ['Arunachal Pradesh'],
  ['Assam'],
  ['Bihar'],
  ['Chhattisgarh'],
  ['Goa'],
  ['Gujarat'],
  ['Haryana'],
  ['Himachal Pradesh'],
  ['Jammu and Kashmir'],
  ['Jharkhand'],
  ['Karnataka'],
  ['Kerala'],
  ['Madhya Pradesh'],
  ['Maharashtra'],
  ['Manipur'],
  ['Meghalaya'],
  ['Mizoram'],
  ['Nagaland'],
  ['Orissa'],
  ['Punjab'],
  ['Rajasthan'],
  ['Sikkim'],
  ['Tamil Nadu'],
  ['Tripura'],
  ['Uttaranchal'],
  ['Uttar Pradesh'],
  ['West Bengal'],
  ['Delhi'],
  ['Lakshadweep'],
  ['Daman and Diu'],
  ['Dadra and Nagar Haveli'],
  ['Chandigarh'],
  ['Pondicherry'],
  ['Andaman and Nicobar Islands']
      ]);
  
   var options = {
             region:'IN',
            backgroundColor: '#81d4fa',
            datalessRegionColor: '#ffc801',
        width:468,
         height:278,
       resolution: 'provinces',
          };
      var container = document.getElementById('mapcontainer');
      var chart = new google.visualization.GeoChart(container);
  
      function myClickHandler(){
          var selection = chart.getSelection();
          var message = '';
          for (var i = 0; i &lt; selection.length; i++) {
              var item = selection[i];
             // if (item.row != null &amp;&amp; item.column != null) {
                  message += '{row:' + item.row + ',column:' + item.column + '}';
              //} else
               if (item.row != null) {
                  message += '{row:' + item.row + '}';
              //} else if (item.column != null) {
                //  message += '{column:' + item.column + '}';
              }
          }
          if (message == '') {
              message = 'nothing';
          }
          //alert('You selected ' + message);
  
          if (item.row==2) {
               window.location = &quot;/andhra_pradesh/&quot;;
          }
          if (item.row==3) {
               window.location = &quot;/arunachal_pradesh/&quot;;
          }
          if (item.row==4) {
               window.location = &quot;/assam/&quot;;
          }
          if (item.row==6) {
               window.location = &quot;/chhattisgarh/&quot;;
          }
          if (item.row==7) {
               window.location = &quot;/goa/&quot;;
          }
          if (item.row==8) {
               window.location = &quot;/gujarat/&quot;;
          }
          if (item.row==9) {
               window.location = &quot;/haryana/&quot;;
          }
          if (item.row==10) {
               window.location = &quot;/himachal_pradesh/&quot;;
          }
          if (item.row==11) {
               window.location = &quot;/jammu_kashmir/&quot;;
          }
          if (item.row==12) {
               window.location = &quot;/jharkhand/&quot;;
          }
          if (item.row==13) {
               window.location = &quot;/karnataka/&quot;;
          }
          if (item.row==14) {
               window.location = &quot;/kerala/&quot;;
          }
          if (item.row==15) {
               window.location = &quot;/madhya_pradesh/&quot;;
          }
          if (item.row==16) {
               window.location = &quot;/maharashtra/&quot;;
          }
          if (item.row==17) {
               window.location = &quot;/manipur/&quot;;
          }
          if (item.row==18) {
               window.location = &quot;/meghalaya/&quot;;
          }
          if (item.row==19) {
               window.location = &quot;/mizoram/&quot;;
          }
          if (item.row==20) {
               window.location = &quot;/nagaland/&quot;;
          }
          if (item.row==21) {
               window.location = &quot;/orissa/&quot;;
          }
          if (item.row==22) {
               window.location = &quot;/punjab/&quot;;
          }
          if (item.row==23) {
               window.location = &quot;/rajasthan/&quot;;
          }
          if (item.row==24) {
               window.location = &quot;/sikkim/&quot;;
          }
          if (item.row==25) {
               window.location = &quot;/tamil_nadu/&quot;;
          }
          if (item.row==25) {
               window.location = &quot;/tripura/&quot;;
          }
          if (item.row==28) {
               window.location = &quot;/uttar_pradesh/&quot;;
          }
          if (item.row==29) {
               window.location = &quot;/west_bengal/&quot;;
          }
          if (item.row==36) {
               window.location = &quot;/andaman_nicobar_islands/&quot;;
          }
      }
      google.visualization.events.addListener(chart, 'select', myClickHandler);
      chart.draw(data, options);
          }
  google.load('visualization', '1', {packages: ['geochart'], callback: drawMap});
  
       &lt;/script&gt;
  
  &lt;div id=&quot;wrapper&quot;&gt;
  
  &lt;!--[if lt IE 7]&gt;
  &lt;div class=&quot;alert-outer alert-error&quot;&gt;
      &lt;a href=&quot;#&quot; class=&quot;alert-closer&quot; title=&quot;close this alert&quot; onclick=&quot;removeIeNotification(this); return false;&quot;&gt;×&lt;/a&gt;
  
      &lt;div class=&quot;alert-inner&quot;&gt;
          &lt;span&gt;&lt;strong&gt;You are using an outdated version of Internet Explorer.&lt;/strong&gt; For a faster, safer browsing experience, upgrade today!&lt;/span&gt;
  
      &lt;/div&gt;
  &lt;/div&gt;
  ![endif]--&gt;
  &lt;header&gt;
  
  
      &lt;h1 id=&quot;logo&quot; class=&quot;sprite_index_in_in_en_logo spritetext&quot;&gt;koolbusiness.com - The right choice for buying &amp;amp;
          selling in india&lt;/h1&gt;
  
      &lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
      &lt;!-- v2 --&gt;
      &lt;ins class=&quot;adsbygoogle&quot;
           style=&quot;display:inline-block;width:728px;height:15px&quot;
           data-ad-client=&quot;ca-pub-7211665888260307&quot;
           data-ad-slot=&quot;9119838994&quot;&gt;&lt;/ins&gt;
      &lt;script&gt;
          (adsbygoogle = window.adsbygoogle || []).push({});
      &lt;/script&gt;
  &lt;/header&gt;
  
  &lt;![endif]--&gt;
  &lt;div style=&quot;width: 100%; overflow: hidden;&quot;&gt;
      &lt;div style=&quot;width: 768px; float: left;&quot;&gt; &lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
  &lt;!-- front leaderboard --&gt;
  &lt;ins class=&quot;adsbygoogle&quot;
       style=&quot;display:inline-block;width:728px;height:90px&quot;
       data-ad-client=&quot;ca-pub-7211665888260307&quot;
       data-ad-slot=&quot;4543980997&quot;&gt;&lt;/ins&gt;
  &lt;script&gt;
  (adsbygoogle = window.adsbygoogle || []).push({});
  &lt;/script&gt; &lt;/div&gt;
      &lt;div id=&quot;post3&quot; style=&quot;margin-left: 735px;&quot;&gt; &lt;a href=&quot;/ai&quot; id=&quot;ad2&quot;&gt;Post your ad for free&lt;/a&gt; &lt;/div&gt;
  &lt;/div&gt;
  
  
  &lt;div class=&quot;main&quot;&gt;
  &lt;div class=&quot;column_left&quot;&gt;
      &lt;div class=&quot;box&quot;&gt;
  
          &lt;ul&gt;
              &lt;li&gt;KoolBusiness is easy, free, and kool.&lt;/li&gt;
              &lt;li&gt;Buy and sell &lt;a href=&quot;/india/cars-for_sale&quot;&gt;cars&lt;/a&gt;, check our &lt;a href=&quot;/india/real_estate&quot;&gt;real
                  estate&lt;/a&gt;
                  section, find &lt;a href=&quot;/india/jobs&quot;&gt;jobs&lt;/a&gt;, and much more.
              &lt;/li&gt;
              &lt;li&gt;Check our &lt;strong&gt;&lt;a href=&quot;/india&quot;&gt;{{count}} ads online&lt;/a&gt;&lt;/strong&gt; and find what you are looking for
                  in
                  your region or in all India.
              &lt;/li&gt;
          &lt;/ul&gt;
  
  
      &lt;/div&gt;
  
      &lt;div id=&quot;regions&quot;&gt;
  
  
          &lt;div class=&quot;region_links_one&quot;&gt;
              &lt;ul class=&quot;regions_one&quot;&gt;
                  &lt;li&gt;&lt;a id=&quot;region_8&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/andhra_pradesh/&quot;&gt;Andhra
                      Pradesh&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_9&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/arunachal_pradesh/&quot;&gt;Arunachal
                      Pradesh&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_10&quot; class=&quot;region&quot;
                         href=&quot;http://www.koolbusiness.com/assam/&quot;&gt;Assam&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_11&quot; class=&quot;region&quot;
                         href=&quot;http://www.koolbusiness.com/bihar/&quot;&gt;Bihar&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_12&quot; class=&quot;region&quot;
                         href=&quot;http://www.koolbusiness.com/chhattisgarh/&quot;&gt;Chhattisgarh&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_13&quot; class=&quot;region&quot;
                         href=&quot;http://www.koolbusiness.com/goa/&quot;&gt;Goa&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_14&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/gujarat/&quot;&gt;Gujarat&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_15&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/haryana/&quot;&gt;Haryana&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_16&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/himachal_pradesh/&quot;&gt;Himachal
                      Pradesh&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_17&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/jammu_kashmir/&quot;&gt;Jammu
                      &amp;amp;
                      Kashmir&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_18&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/jharkhand/&quot;&gt;Jharkhand&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_19&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/karnataka/&quot;&gt;Karnataka&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_20&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/kerala/&quot;&gt;Kerala&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_21&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/madhya_pradesh/&quot;&gt;Madhya
                      Pradesh&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
              &lt;ul class=&quot;regions_two&quot;&gt;
                  &lt;li&gt;&lt;a id=&quot;region_22&quot; class=&quot;region&quot;
                         href=&quot;http://www.koolbusiness.com/maharashtra/&quot;&gt;Maharashtra&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_23&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/manipur/&quot;&gt;Manipur&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_24&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/meghalaya/&quot;&gt;Meghalaya&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_25&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/mizoram/&quot;&gt;Mizoram&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_26&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/nagaland/&quot;&gt;Nagaland&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_27&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/orissa/&quot;&gt;Orissa&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_28&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/punjab/&quot;&gt;Punjab&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_29&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/rajasthan/&quot;&gt;Rajasthan&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_30&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/sikkim/&quot;&gt;Sikkim&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_31&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/tamil_nadu/&quot;&gt;Tamil
                      Nadu&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_32&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/tripura/&quot;&gt;Tripura&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_34&quot; class=&quot;region&quot;
                         href=&quot;http://www.koolbusiness.com/uttaranchal/&quot;&gt;Uttaranchal&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_33&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/uttar_pradesh/&quot;&gt;Uttar
                      Pradesh&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a id=&quot;region_35&quot; class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/west_bengal/&quot;&gt;West
                      Bengal&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
          &lt;div class=&quot;region_links_two&quot;&gt;
              &lt;!-- ads here --&gt;
              &lt;h2&gt;Union territories&lt;/h2&gt;
  
  
              &lt;ul class=&quot;regions_one&quot;&gt;
                  &lt;li&gt;&lt;a class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/delhi/&quot;&gt;Delhi&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/lakshadweep/&quot;&gt;Lakshadweep&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/daman_diu/&quot;&gt;Daman &amp;amp; Diu&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/dadra_nagar_haveli/&quot;&gt;Dadra &amp;amp; Nagar
                      Haveli&lt;/a&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
              &lt;ul class=&quot;regions_two&quot;&gt;
                  &lt;li&gt;&lt;a class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/chandigarh/&quot;&gt;Chandigarh&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/pondicherry/&quot;&gt;Pondicherry&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a class=&quot;region&quot; href=&quot;http://www.koolbusiness.com/andaman_nicobar_islands/&quot;&gt;Andaman &amp;amp;
                      Nicobar
                      Islands&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
  &lt;/div&gt;
  &lt;div id=&quot;my_wrapper&quot;&gt;
  
  &lt;div id=&quot;mapcontainer&quot;&gt;&lt;/div&gt;
  &lt;div id=&quot;gads&quot; style=&quot;clear:both&quot;&gt;
  
  &lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
  &lt;!-- frontpagebelowmap --&gt;
  &lt;ins class=&quot;adsbygoogle&quot;
       style=&quot;display:inline-block;width:300px;height:250px&quot;
       data-ad-client=&quot;ca-pub-7211665888260307&quot;
       data-ad-slot=&quot;3839303791&quot;&gt;&lt;/ins&gt;
  &lt;script&gt;
  (adsbygoogle = window.adsbygoogle || []).push({});
  &lt;/script&gt;
  
  
  
  &lt;/div&gt;
  &lt;/div&gt;
  
  
  
  &lt;footer class=&quot;nohistory columns&quot;&gt;
  
  
  
      &lt;p class=&quot;first&quot;&gt;A good deal is just around the corner!&lt;/p&gt;
  
  
      &lt;p&gt;KoolBusiness is the right choice for safe buying and selling in India: a free classifieds website where you
          can buy and sell almost everything.&lt;/p&gt;
  
  
      &lt;p&gt;&lt;a href=&quot;/ai&quot;&gt;Post an ad for free&lt;/a&gt; or browse through our categories. You will find thousands of free
          classifieds for cars, houses, mobile phones and gadgets, computers, pets and dozens of items and services in
          your state or union territory.&lt;/p&gt;
  
  
      &lt;p&gt;
  
          &lt;strong&gt;KoolBusiness does not charge any fee and does not require registration.&lt;/strong&gt; Every
          ad is checked so we can give you the highest quality possible for the ads on our site. That’s why
          KoolBusiness is the most convenient, easiest to use and most complete free ads site in India.&lt;/p&gt;
  
  
      &lt;div id=&quot;world_sites&quot;&gt;
  
  
  
  
  
      &lt;/div&gt;
  
  
  
  
  &lt;/footer&gt;
  
  &lt;/div&gt;
  
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>