I’ve got this function that plots a point from an address in a text field
function poiFromAddress() {
var address = document.getElementById('address').value
var geocoder = new GClientGeocoder();
geocoder.getLatLng(
address,
function(point){
if (!point) {
alert("We're sorry, " + address + " cannot be located");
} else {
var html = "<b>Search Location</b><br>" + address;
html += '<br /><a href="[removed]gmap.setZoom(15);">Zoom in</a>';
var marker = createDeluxeMarker(1, point, jobicon, html);
gmap.addOverlay(marker);
mapbounds.extend(point);
}
})
}
For some reason the mapbounds.extend does not work. I’ve tried just about every combination and I can’t get this point to be part of the calculation for zooming and centering the map. I believe it is a variable scope issue.
