Listing Proximity Function/Interupts JS functions

Posted in

Starting on line 1135 of "ulisting.module", this code breaks if you only have one listing in the system. The comments indicate where we fixed it.

/** HERKIMER MOVED BELOW DUE TO MAPPING ERROR 6/8/2009 SKB
var markerGroups = {\"nearby_listings\": []};
*/
";
$nearby_js = "

$list_array
for (var i = 0; i < markers.length; i++){
var latlon = new GLatLng(markers[i][0],markers[i][1]);
var html = markers[i][2];
var marker = createMarker(latlon,html);
map.addOverlay(marker);
}

";
};

$control .= 'map.addControl(new GSmallMapControl());' . "\n";
$control .= 'map.addControl(new GMapTypeControl());' . "\n";
drupal_add_js(
"
/** HERKIMER MOVED HERE DUE TO MAPPING ERROR 6/8/2009 SKB */
var markerGroups = {\"nearby_listings\": []};