His gmarkers[] is an array of markers. He has basically pushed what markers he wants to manipulate after creating them into an array and poisition i.
So gmarkers[i] is the marker he has stored in an array at whatever position i is. He has done the same for his infowindows. Using the same reference, i in this case, for the marker as the infowindow. On the click event he is opening the infowindow[i], for marker[i]. That help you out any? On Thu, Sep 9, 2010 at 3:47 PM, paulp575 <[email protected]> wrote: > On Sep 8, 11:43 am, "[email protected]" <[email protected]> > wrote: > > > > Are you trying to do something like this? > http://www.geocodezip.com/GenericMapBrowser.asp?filename=F18CrashSite... > > > > It handles tabbed infowindows, so might be a little more complicated than > you are looking for, but most of it came from Mike's tutorials as well. > > For geocodezip - your suggestion is too complicated for what I'm > trying to do. I just want to add the "Directions: To here - From here" > line to the infoWindows, as in this example: > > http://econym.org.uk/gmap/example_map4.htm > > For Nathan - I've already got the infoWindows working. > > When I look at the above example's javascript, the code is so > different than mine here: > > > http://www.dog-walker.us/WOHVA/Catalog-map-with-ELabels/catalog-map-with-ELabels.htm > > In my javscript, the code for the picking up the click is: > > function myclick(i) > { > GEvent.trigger(gmarkers[i], "click"); > } > > In the above example, the javascript code for the same function is: > > function myclick(i) > { > gmarkers[i].openInfoWindowHtml(htmls[i]); > } > > So far I have been able to cut and paste examples into my code - with > some help from this forum - but this is so different I don't know how > to modify my code to include the directions line. > > Thanks, > > Paul > > -- > 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]<google-maps-api%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-maps-api?hl=en. > > -- 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.
