In the function that adds the marker start with the text you want in
the infowindow
var htmltext = "blah blah Mike's Gym blah blah ..."
then add the link
htmltext += '<a target="linkWindow" href="http://
www.MikesGym.com'">Mikes Gym</a>'
Then after creating the marker, call the listener thus:
function addListeners(marker, htmltext) {
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(htmltext);
} );
return marker;
}
On Apr 6, 12:03 pm, ajr <[email protected]> wrote:
> Hi,
>
> Firstly, I hope I am the correct group - I have a Google API map.
>
> I have a site with a google map
> -http://www.gymlink.no/treningssenter/vestagder/kristiansandkart.html
> (This is a gym directory). I would like to add a website link to the
> description when the arrow is clicked and an information box comes up.
> For example, Mikes Gym, the address and then a link to his site.
>
> I tried many different things, but cant seem to get one on there.
> Based on the code I have used for the map, how can I add a link?
>
> Would appreciate any help. Cheers Adam
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---