Hi Bruce, Thanks for your efforts but I'm just going round in circles! I thought you might have a new take on it that I hadn't thought of !
I've gone back full circle round to the point where I get " [object HTMLDivElement] " shown in the sidebar when I click a check box and hide certain markers. See: http://www.trycornwall.co.uk/googlemaps/index2.html I was hoping that some GMAPS genius would have come across this little problem before and know the cure and furnish me with the code tweak to resolve it :-) Never mind . . . . . I guess I'll just go get myself a cold beer ;-) Many thanks for taking the time to respond to my questions, I do very much appreciate your efforts. Thanks On May 1, 7:16 pm, Bruce Van Allen <[email protected]> wrote: > On 5/1/09 at 10:02 AM, [email protected] (doodle) wrote: > > >Can you tell me ( show me the code ) how I would go about including > >the createSidebarEntry() function within the loop of makeSidebar() ?? > > Right now, createSidebarEntry() takes several arguments, starting with > marker. The marker variable not only holds the marker object, but also > has the site-specific data (title, bed, sleep, heat, pet, park, smoke, > postcode, phone, distance). So as makeSidebar() iterates through > gmarkers, it has the site data available for each marker. That means > that makeSidebar() could have something like this in it: > > var html = ""; > for (var i=0; i<gmarkers.length; i++) { > if (!gmarkers[i].isHidden()) { > html += createSidebarEntry(marker, marker.title, > marker.bed, marker.sleep, [etc.] ) > } > } > > Note that [etc.] is not code -- I just didn't want to type all the > marker.XX attributes. Be sure to get them in the order that the > function expects. > > BTW, this shows that the marker is all you really need to pass to > createSidebarEntry(); you can get its attributes inside the function. > Then the order of the args to the function is much simpler and if you > change the function you don't risk messing up the args. > > The above is untested. We list members can't really write your code > for you, but I think this could guide you. > > Code, test, debug, post followup questions here, repeat. > > HTH. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
