Hi there,
I see some points you could correct:
google.maps.event.addListener(flightPath, 'click', function(event) {
infowindow.content = "x";
infowindow.position = event.latLng;
infowindow.open(map);//,flightPath);
});
1) the callback function must have an "event" argument, otherwise it will be
undefined
2) the property of event is latLng and not latlng (note the upperCase)
3) the flightPath is not a good MVCObject for the infoWindow.open function.
Maybe you could use a point of the path
Hope it helps,
Cheers
Davide
2010/5/27 sb <[email protected]>
> I am trying to get an infowindow open on the click of a polyline.
>
> The event is being triggered but I am unable to get the infowindow to
> display. I have no trouble doing this with a marker so there must be
> something slightly different I am missing.
>
> Here is an example of what I am trying to do
> http://srsz750.appspot.com/api3/polyline-simple.html
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-maps-js-api-v3%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.