From GamingWiki
Jump to: navigation, search
Line 78: Line 78:
 
for ( i = 0; i < markers.length; i++ ) {
 
for ( i = 0; i < markers.length; i++ ) {
 
marker = markers[i];
 
marker = markers[i];
if (typeof marker['address'] === 'undefined' || marker['address'] == '') {
+
if (typeof marker['lat'] === 'undefined' || marker['lat'] == ''
 +
|| typeof marker['lng'] === 'undefined' || marker['lng'] == '') {
 +
addMarkerByAddress(marker['address'], marker['name'], marker['node']);
 +
} else {
 
addMarkerByLatLng(marker['lat'], marker['lng'], marker['name'], marker['node']);
 
addMarkerByLatLng(marker['lat'], marker['lng'], marker['name'], marker['node']);
} else {
 
addMarkerByAddress(marker['address'], marker['name'], marker['node']);
 
 
}
 
}
 
}
 
}

Revision as of 14:16, 1 April 2011