Hi,
In my createMarker function I can add setZoom and setCentre to the
click event like so, and it works great:
google.maps.event.addListener(marker, 'click', function() {
infobox.open(map, marker);
map.setZoom(12);
map.setCenter(latlng);
});
However I don't want to do this, I want this to occur on a link in the
infobox's content, but this code below won't work:
function zoomIn(latlng) {
map.setZoom(12);
map.setCenter(latlng);
}
content = "<a href=\"javascript:zoomIn(latlng)\">Zoom</a>";
Example page:
http://bit.ly/d22gZo
Any ideas on why?
Thanks