Hey,

I got a problem with the Google Maps API. I have a small number of
waypoints, which become a route by using
GDirections.loadFromWaypoints(waypoints); So far so good.
Now i want to add a small Information window, with the adress of the
waypoint in it, just as a feature. Here is the code that does not
work:

var waypoints = new Array(...);
var information = new Array(...);


for(var i=0; i<waypoints.length; i++) {
                 var marker = directons.getMarker(i);

                 GEvent.addListener(marker, "mouseover",
                         function() {
                                marker.openInfoWindowHtml(information[i]);
                         }
                  );

                  GEvent.addListener(marker, "mouseout",
                         function() {
                                 marker.closeInfoWindow();
                         }
                  );
}

I tried it with normal markers and it worked, but it does not look
good. So why can't I add a listener to the waypoint marker?

I hope you can help me.

Regards,
Felix


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