Ok, simple question but is it possible to call an external javascript function within a google maps listener?
GEvent.addListener(map,"click", function(overlay, latlng) {
testfunction(latlng);
});
testfunction doesn’t run, so is there a particular way i need to go about this? I’m new to google maps and javascript.
Try your listener handler function with one parameter at first: a GLatLng object that corresponds to the latitude/longitude where the user clicked on the map.
Give this a try initially:
If that doesn’t work, ensure that your
testfunctionis handling the GLatLng type properly (using the object’s properties correctly, etc.).