hi thank you for your response
i checked this  http://www.geocodezip.com/\DirectionsInfoWindow.html
and i seems very logical but i don't know why it's not working with
me,
i think it's something to do with referencing since i'm declaring the
function and events in the loop ( the cause of the loop is because i
want to draw all the routes existing)

/******************************************************************/
  for (var i = tournee.length -1; i>=0  ; i--)
  {
      gdirections[i] = new GDirections(map);
      changementCouleur(i) /* contains listener "load" */
      listeRoutes[i] = new Array();
      for (var j = 0;j<tournee[i].nbSommets ;j++)
      {
        listeRoutes[i][j] = (j+1) + ": " + " TITLE "+ "@" + tournee
[i].sommet[j].marker.getPoint().lat() + "," + tournee[i].sommet
[j].marker.getPoint().lng();
      }
      gdirections[i].loadFromWaypoints(listeRoutes
[i],directionOptions);
 }

/*****************************************************************/

and the function changementCouleur(i) contains
/
*************************************************************************/
 function changementCouleur(i)
{
    GEvent.addListener(gdirections[i], "load", function(){
                                                
this.getPolyline().setStrokeStyle({
                                                        color: colors[i],
                                                        opacity: '1',
                                                        weight: '4'
                                                });

            for (var z=0; z < this.getNumRoutes(); z++)
            {
              changeImage(z);
            }

            function changeImage(z) {
              var marker = this.getMarker(z);
              GEvent.addListener(marker, "click", function() {
                alert("voodoo");
                marker.openInfoWindowHtml(marker.getTitle());
              });
            }
          });
}
/
************************************************************************/

i get the error that "this.getNumRoutes()" and "this.getMarker()" is
not defined, althought  "this.getPolyline()" works fine

is there something i'm missing? plz tell me in my case if there is
something wrong, and if someone worked on a similar point, how it was
solved. thank you
--~--~---------~--~----~------------~-------~--~----~
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