On Nov 2, 7:56 am, xelawho <[email protected]> wrote: > > If you do it outside of that function gpolylines.length-1 will always > > point to the last polyline in your xml (or be zero). > > > gpolylines[0] will always be the first polyline in your xml. > > gpolylines[1] will always be the second polyline, etc. > > > If you don't want to count on the order of the xml, you can change the > > gpolylines array (or create new array) to be an associative array > > indexed with an "id" that you define in your xml. > > > -- Larry > > thanks, Larry. > > but does this not mean that I can just link to the polylines by pre- > defining their numbers like this: > <a href='javascript:GEvent.trigger(gpolylines[2],"click");'>Blue line</ > a>
You should be able to. > > (obviously not, because it doesn't work - I get an "a is undefined" > error when I click on the link) Where is the map that doesn't work? Does the infowindow work if you click on the polyline? Did you define the click event handler correctly (so it handles the case when it isn't a "real" click)? -- Larry > > I'm obviously missing something fundamental? > > thanks for your help. > > Lucas -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" 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.
