I've tried searching for solutions on various forums, including stackoverflow, but haven't been able to make it work. The issue lies in this code snippet where the variable 'pos' is not being set:
var geocoder= new google.maps.Geocoder();
var pos = geocoder.geocode({'address': getCookie('banner-location')}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
return {lat: results[0].geometry.location.lat(), lng: results[0].geometry.location.lng()};
} else {
return {lat: 0, lng: 0};
}
});