I'm using the following to get a Google map based on the address but it has stopped working - 204 No Content is returned (404)
Has anything changed in the past month?
function initialize() { if($("#address1").val()!="" && $("#city").val()!="" && $('[name="country"]').val()!=""){ map = new google.maps.Map(document.getElementById('map_canvas'), { mapTypeId: google.maps.MapTypeId.ROADMAP }); mapGeo = new google.maps.Geocoder(); mapGeo.geocode({'address': 'Europe'}, function (results, status) { var ne = results[0].geometry.viewport.getNorthEast(); var sw = results[0].geometry.viewport.getSouthWest(); map.fitBounds(results[0].geometry.viewport); }); codeAddress() } else{ alert("Please enter your street address, city and country on the Property Details tab") }}
Exact same code as I have except I had map.checkResize() at the end
Removing this and now it works again. I think this was a remnant from when the map was created even though it wasn't visible
Gary
ASKER
Ahh that is why i need map.checkResize(), because if you leave the tab and come back to it, maybe because of a change of address then it doesn't resize the map correctly - so it's not solved
I have a working mock up using the code you provided, plus my version of the codeAddress function.
Open in new window