> http://bfwebdev.nmsu.edu/ADV_ASP_BJM/polylinemap3.html
I get a script error, don't you?
" poly is not defined " in
google.maps.event.addListener(poly,'click', ...
Did you mean
google.maps.event.addListener(flightPath,'click', ...
as you called your polyline 'flightPath' ?
The next problem you will run into is here
According to the docs where you took the example
http://code.google.com/apis/maps/documentation/javascript/overlays.html#InfoWindows
"InfoWindows may be attached to either Marker objects (in which case
their position is based on the marker's location) or on the map itself
at a specified LatLng."
You can't attach them to a polyline, its not specific enough to guess
where you want the infowindow opened - at the end, which end, in the
middle, somewhere else?
So you'll need to give a LatLng.
You can get that from the mouse click event itself, have a look at how
one of Larry's examples does it
http://www.geocodezip.com/v3_GenericMapBrowser.asp?filename=I5Polyline.xml
--
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.