How do I hyperlink country or other area to some URL?

Martynas Majeris -

Just add "url" parameter to the area definition object. I.e.:

{
  title: "United States",
  id: "US",
  color: "#3366CC",
  url:"http://www.google.com"}
Have more questions? Submit a request

Comments

  • Avatar
    Peter Clay

    Thank for this.

    Just having a few problems getting it to work however. How would you add this to a drill down map?

    Do you add it world_low.js or directly to the drilldownmap.html?

    If it's the second option, how would you add the code to the file?

     

    thanks

    Peter

  • Avatar
    Peter Clay

    Actually I found it. Here my answer for anyone else that may need it.

    I added this line

    areas:[{id:"AU", color:"#000000", url:"http://www.text.com"},{id:"US", color:"#00CC00"},{id:"FR", color:"#0000CC"}]   

    to

      var worldDataProvider = {

              mapVar: AmCharts.maps.worldLow,

                                         

                    };

              

    I also removed this line deleted getAreasFromMap:tru from the above strong.

    hope this helps

    Peter

  • Avatar
    mikaanaku

    Great sharing. thank u
    {title: "Commonwealth Life Perusahaan Asuransi Jiwa Terbaik Indonesia",
    id: "US",
    color: "#3366CC",
    url:"http://misscareful.blogspot.com/2012/10/commonwealth-life-perusahaan-asuransi.html"}

  • Avatar
    Eustace Hugo

    how about region specific? Is it possible?

Powered by Zendesk