I see whats going wrong, an error is occurring if the recordset is empty. In the wagmp_map_2.php file, change line 145 - 262 to:
<?php if($totalRows_getUserCities > 0) { ?>
<?php $getUserCities_id = 0; ?>
<?php do { ?>
var address_0_<?php echo $getUserCities_id; ?> = {
street: '<?php echo str_replace("'", "\'", "".$row_getUserCities['store_address'] .""); ?>',
city: '<?php echo str_replace("'", "\'", "".$row_getUserCities['store_city'] .""); ?>',
state: '',
zip: '<?php echo str_replace("'", "\'", "".$row_getUserCities['store_zip'] .""); ?>',
country: 'Denmark',
infowindow: 'custom',
infowindowtext: '<span style="font: 12px Verdana, Arial, Helvetica, sans-serif; color: black;"><strong><?php echo str_replace("'", "\'", "".$row_getUserCities['store_name'] ."</strong><br />".$row_getUserCities['store_address'] ."<br />".$row_getUserCities['store_city'] ." ".$row_getUserCities['store_zip'] ." Denmark"); ?></span>',
full: '<?php echo str_replace("'", "\'", "".$row_getUserCities['store_address'] .""); ?>, <?php echo str_replace("'", "\'", "".$row_getUserCities['store_city'] .""); ?>, <?php echo str_replace("'", "\'", "".$row_getUserCities['store_zip'] .""); ?>, Denmark',
isdefault: true,
addressType: 'address',
loop: 'getUserCities',
latitude: '',
longitude: '',
markerStyle: 'Google Traditional (flat)',
markerColor: 'Pacifica'
};
if (address_0_<?php echo $getUserCities_id; ?>.addressType == "coordinates") {
var cacheReturn = '';
} else {
var cacheReturn = searchCache(address_0_<?php echo $getUserCities_id; ?>.full, address_0_<?php echo $getUserCities_id; ?>.zip);
}
if (cacheReturn != "" || (address_0_<?php echo $getUserCities_id; ?>.addressType == "coordinates")) {
if(address_0_<?php echo $getUserCities_id; ?>.addressType == "coordinates") {
var latitude = address_0_<?php echo $getUserCities_id; ?>.latitude;
var longitude = address_0_<?php echo $getUserCities_id; ?>.longitude;
} else {
var latitude = cacheReturn.substring(1,cacheReturn.indexOf(",")-1);
var longitude = cacheReturn.substring(cacheReturn.indexOf(",")+1,(cacheReturn.length)-1);
}
var point = new GLatLng(latitude, longitude);
if (point && !isNaN(latitude)) {
wagmp_map_2_obj.addressFailed = false;
var marker_0_<?php echo $getUserCities_id; ?> = new GMarker(point, icon_0);
GEvent.addListener(marker_0_<?php echo $getUserCities_id; ?>, 'click', function() {
marker_0_<?php echo $getUserCities_id; ?>.openInfoWindowHtml(address_0_<?php echo $getUserCities_id; ?>.infowindowtext);
});
if(!fromAddress.enabled || 'address_0_<?php echo $getUserCities_id; ?>' != 'address_0_0') {
if('address_0_<?php echo $getUserCities_id; ?>' == 'address_0_0')
map.setCenter(point, 13);
map.addOverlay(marker_0_<?php echo $getUserCities_id; ?>);
if('address_0_<?php echo $getUserCities_id; ?>' == 'address_0_0')
marker_0_<?php echo $getUserCities_id; ?>.openInfoWindowHtml(address_0_<?php echo $getUserCities_id; ?>.infowindowtext);
}
wagmp_map_2_obj.markers.push(marker_0_<?php echo $getUserCities_id; ?>);
wagmp_map_2_obj.addresses.push(address_0_<?php echo $getUserCities_id; ?>);
wagmp_map_2_obj.icons.push(icon_0);
wagmp_map_2_obj.points.push(point);
} else {
if (wagmp_map_2_obj.addressFailed) {
map.setCenter(new GLatLng(30, -98), 3);
}
wagmp_map_2_obj.addressFailed = true;
}
} else if (address_0_<?php echo $getUserCities_id; ?>.addressType == "address") {
geocoder.getLatLng (
address_0_<?php echo $getUserCities_id; ?>.full,
function(point) {
if(point) {
this.addressFailed = false;
addToCache(address_0_<?php echo $getUserCities_id; ?>.full, '', point);
var marker_0_<?php echo $getUserCities_id; ?> = new GMarker(point, icon_0);
GEvent.addListener(marker_0_<?php echo $getUserCities_id; ?>, 'click', function() {
marker_0_<?php echo $getUserCities_id; ?>.openInfoWindowHtml(address_0_<?php echo $getUserCities_id; ?>.infowindowtext);
});
if(!fromAddress.enabled || 'address_0_<?php echo $getUserCities_id; ?>' != 'address_0_0') {
if('address_0_<?php echo $getUserCities_id; ?>' == 'address_0_0')
map.setCenter(point, 13);
map.addOverlay(marker_0_<?php echo $getUserCities_id; ?>);
if('address_0_<?php echo $getUserCities_id; ?>' == 'address_0_0')
marker_0_<?php echo $getUserCities_id; ?>.openInfoWindowHtml(address_0_<?php echo $getUserCities_id; ?>.infowindowtext);
}
wagmp_map_2_obj.markers.push(marker_0_<?php echo $getUserCities_id; ?>);
wagmp_map_2_obj.addresses.push(address_0_<?php echo $getUserCities_id; ?>);
wagmp_map_2_obj.icons.push(icon_0);
wagmp_map_2_obj.points.push(point);
} else {
var noZipAddress = address_0_<?php echo $getUserCities_id; ?>.full.replace((address_0_<?php echo $getUserCities_id; ?>.zip+','), '');
geocoder.getLatLng (noZipAddress,
function(point) {
if(point) {
wagmp_map_2_obj.addressFailed = false;
addToCache(address_0_<?php echo $getUserCities_id; ?>.full, address_0_<?php echo $getUserCities_id; ?>.zip, point);
var marker_0_<?php echo $getUserCities_id; ?> = new GMarker(point, icon_0);
GEvent.addListener(marker_0_<?php echo $getUserCities_id; ?>, 'click', function() {
marker_0_<?php echo $getUserCities_id; ?>.openInfoWindowHtml(address_0_<?php echo $getUserCities_id; ?>.infowindowtext);
});
if (!fromAddress.enabled || 'address_0_<?php echo $getUserCities_id; ?>' != 'address_0_0') {
if('address_0_<?php echo $getUserCities_id; ?>' == 'address_0_0')
map.setCenter(point, 13);
map.addOverlay(marker_0_<?php echo $getUserCities_id; ?>);
if('address_0_<?php echo $getUserCities_id; ?>' == 'address_0_0')
marker_0_<?php echo $getUserCities_id; ?>.openInfoWindowHtml(address_0_<?php echo $getUserCities_id; ?>.infowindowtext);
}
wagmp_map_2_obj.markers.push(marker_0_<?php echo $getUserCities_id; ?>);
wagmp_map_2_obj.addresses.push(address_0_<?php echo $getUserCities_id; ?>);
wagmp_map_2_obj.icons.push(icon_0);
wagmp_map_2_obj.points.push(point);
} else {
if (wagmp_map_2_obj.addressFailed) {
map.setCenter(new GLatLng(30, -98), 3);
}
wagmp_map_2_obj.addressFailed = true;
}
}
);
}
}
);
}
<?php $getUserCities_id++; ?>
<?php } while ($row_getUserCities = mysql_fetch_assoc($getUserCities)); ?>
<?php mysql_data_seek($getUserCities, 0); ?>
<?php } else { ?>
map.setCenter(new GLatLng(30, -98), 3);
<?php } ?>
I am attaching a copy of the file with the code added.