Further research (fiddling with it), I have managed to return the
company name into the topbar by using your code:-

 function Info(i) {
GEvent.trigger(gmarkers[i],"click");
//document.getElementById("topbar").innerHTML="";
//document.getElementById("topbar").innerHTML=gmarkers[i].html;
document.getElementById("topbar").innerHTML=gmarkers[i].name;
 }

the document.getElementById("topbar").innerHTML=gmarkers[i].html;
didn't return anything even though the html is defined as the name and
address like this:-
 var html = "<b>"+name+"<\/b><p style='font-size:smaller'>" + address
+ "<\/p>";

So I can return either the name or the address by using either .name
or .address but I can't get the syntax to return both into the topbar.

Any thoughts on getting the name and address together?

cheers
Paul.



On Oct 17, 12:12 pm, Paul <[email protected]> wrote:
> Thank you for the reply xelawho,
>
> It generated the word "undefined" in the topbar box.
> So I tried to define it earlier on in the code by using;  var topbar =
> [];  but this did not do the trick.
>
> I will play with it later this evening when I get home from work, I'll
> follow the lines you indicated. I feel like I'm close but not quite
> there.
> cheers
> Paul.
>
> On Oct 17, 4:30 am, xelawho <[email protected]> wrote:
>
>
>
> > like you say, it's much more of a javascript question than a maps
> > question.
>
> > but it seems like the quick and ugly way to do it would be to change
> > your Info function to something like this:
>
> >  function Info(i) {
> > document.getElementById("topbar").innerHTML="";
> > document.getElementById("topbar").innerHTML=gmarkers[i].html;
> >  }
>
> > maybe...- Hide quoted text -
>
> - Show quoted text -

-- 
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.

Reply via email to