I have - probably - a problem of reference ...

I create a polygon:
p = new GPolygon(...);
and I insert it in a tab called "areas":
insert(myCircle, p);

//creation of object
function createFigure(n,f) {
 this.thename = n;
 this.thefig = f;
}
//insertion
function insert(name, fig) {
var e = new createFigure(name,fig);
areas[areas.length] = e;
map.addOverlay(areas[areas.length].thefig);
}

The display is correct.
Now I want to redraw the polygon with another color:
function re_draw(name) {
   for (var i = 0; i < aeras.length; i++)
   {
      if (aeras[i].thename== name)
      {
           aeras[i].thefig.color = "#ffff00";
           aeras[i].thefig.redraw();
      }
   }
}
MY POLYGON DOESN'T CHANGE !
Any ideas ?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to