Revision history [back]

click to hide/show revision 1
initial version

answered 2009-05-15 08:40:25 +0800

hideokidd gravatar image hideokidd

Hi,

The onInfoChange event may help,

first I declared a variable to store the default opened ginfo, and the other variable to store the current active(opened) ginfo.

<zscript>
  Ginfo defaultGinfo = ....
  Ginfo currentGinfo = defaultGinfo;
</zscript>

Then the onInfoChange will be

<gmaps id="map" width="500px" height="300px">
  <attribute name="onInfoChange">   //fired when a ginfo is closed
     if (self.getInfo() == null){ //you close a ginfo and no other ginfo is opened
                              //the closed ginfo would be currentGinfo      
     }
     else{ //you close a ginfo and another ginfo is opened
    currentGinfo =  self.getInfo();
     }
  </attribute>
</gmaps>

Please try the example, hope it helps a lot.

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More