From GamingWiki
(20 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
+ | </includeonly> | ||
<html> | <html> | ||
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> | <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> | ||
Line 20: | Line 21: | ||
var map; | var map; | ||
var infowindow; | var infowindow; | ||
− | var markers; | + | var markers = new Array(); |
function initialize() { | function initialize() { | ||
Line 30: | Line 31: | ||
} | } | ||
geocoder = new google.maps.Geocoder(); | geocoder = new google.maps.Geocoder(); | ||
− | infowindow = new google.maps.InfoWindow(); | + | infowindow = new google.maps.InfoWindow({maxWidth: 256}); |
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); | map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); | ||
getMarkerList(); | getMarkerList(); | ||
Line 75: | Line 76: | ||
*/ | */ | ||
function getMarkerList() { | function getMarkerList() { | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
for ( i = 0; i < markers.length; i++ ) { | for ( i = 0; i < markers.length; i++ ) { | ||
marker = markers[i]; | marker = markers[i]; | ||
− | if (marker['address'] | + | if (typeof marker['address'] === 'undefined' || marker['address'] == '') { |
− | + | addMarkerByLatLng(marker['lat'], marker['lng'], marker['name'], marker['node']); | |
} else { | } else { | ||
− | + | addMarkerByAddress(marker['address'], marker['name'], marker['node']); | |
} | } | ||
} | } | ||
Line 99: | Line 88: | ||
// --></script> | // --></script> | ||
</html> | </html> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 17:55, 17 March 2011