From GamingWiki
Line 108: | Line 108: | ||
function getMarkerList() { | function getMarkerList() { | ||
for ( i = 0; i < markers.length; i++ ) { | for ( i = 0; i < markers.length; i++ ) { | ||
− | marker = markers[i]; | + | var marker = markers[i]; |
// Figure out what sort of information we have here. | // Figure out what sort of information we have here. | ||
− | if ( | + | if (marker['corners'] != '') { |
// this is a zone | // this is a zone | ||
+ | // parse the corners into an array | ||
+ | var corners = new Array(); | ||
+ | var cornerstrings = marker['corners'].split('::'); | ||
+ | for ( j = 0; j < cornerstrings.length; j++ ) { | ||
+ | var ll = cornerstrings[j].split(','); | ||
+ | corners[j] = new google.maps.LatLng(ll[0],ll[1]); | ||
+ | } | ||
+ | addZone((marker['lat'], marker['lng'], corners, marker['name'], marker['id']); | ||
} elseif (typeof marker['lat'] === 'undefined' || marker['lat'] == '' | } elseif (typeof marker['lat'] === 'undefined' || marker['lat'] == '' | ||
|| typeof marker['lng'] === 'undefined' || marker['lng'] == '') { | || typeof marker['lng'] === 'undefined' || marker['lng'] == '') { |
Revision as of 20:38, 16 May 2011