Dear All:

I face a problem in GEvent.addlistener,code as follow :

var poly = new GPolyline();
map.addOverlay( poly );
GEvent.addListener(poly,"click",function{
      map.removeOverlay(poly);
      var new_poly = new GPoly;
      map.addOverlay( new_poly );
      GEvent.addListener(new_poly,"click",function{
              //code
      });
      var marker = new GMarker();
      map.addOverlay(marker);
      GEvent.addListener(marker,"click",function{
              //code
      });
});

in testing on FireFox browser, the 1st layer listener(poly) can work ,
the 2nd layer listener(new_poly) also can work. But the 2nd layer
listener(marker) can not work.
I try to separate into two invidiual listener but it still can not
work. May someone face the same situation? or any solution, thanks
alot.

--~--~---------~--~----~------------~-------~--~----~
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