View Full Version : help with JS and google maps

05-15-2007, 10:30 AM
hi, i've been using the wonderful tutorial found here (http://www.tomanthony.co.uk/blog/geocoding-uk-postcodes-with-google-map-api/) to create a google maps API for a site of mine. it uses an external .JS file to store the perameters and functions of the google API, as i understand it... i'm a javascript noob (hence why i need help!)

the page i'm working on can be found here http://www.farmersmarkets.net/google%20maps%20API/AJAX%20test/ajax4.htm
and the .JS file is here http://www.farmersmarkets.net/google%20maps%20API/AJAX%20test/gmap.js

the problem i'm having is in generating the info windows for the markers. i just can't work out how to do it... i think i'm calling the Gmaps API function in the .js file with

function openInfoWindowHtml()
GEvent.addListener(marker, "click")


and calling that in the html with

marker.openInfoWindowHtml = "home"
after the appropriate marker's postcode

but it just doesn't seem to work :(

any clues as to why? am i totally barking up the wrong tree? any help would be really appreciated, as this is the last hurdle before this project can finally be put into practice!