amMap support forum

You are not logged in.

Announcement

FORUM CLOSED! This forum is closed. We moved to a new place at Zendesk. Update your bookmarks.

Flash amMap: Help


#1 2012-04-09 06:39:24

trichins
Moderator

Multiple Selection

qemm will need to answer this one.

Offline

 

#2 2012-04-16 01:58:22

qemm
Administrator

Re: Multiple Selection

It is possible using JavaScript API function setColor which allows setting the color on any chart area. You can catch the click on the area using amRegisterClick callback function. I.e.:

Code:

var selected = {};
function amRegisterClick(map_id, object_id, title, value){
  if (selected[object_id] != undefined && selected[object_id]) {
    // unselect (set it to blue)
    document.getElementById("ammap").setColor(object_id, "#0000ff");
    selected[object_id] = false;
  }
  else {
    // select (set it to red)
    document.getElementById("ammap").setColor(object_id, "#ff0000");
    selected[object_id] = true;
  }
}

Offline

 

© amMap & amCharts | Forum engine: PunBB