var map1; function map1_initialize() { if (GBrowserIsCompatible()) { var latlng1 = [ [new GLatLng(42.32081,-83.03461), '
'],[new GLatLng(42.31901,-83.04303), ''],[new GLatLng(42.31572,-83.0377), ''],[new GLatLng(42.2817,-83.05488), ''],[new GLatLng(42.31717,-83.04223), ''],[new GLatLng(42.31889,-83.04347), ''],[new GLatLng(42.26574,-83.04465), ''],[new GLatLng(42.28187,-83.05436), ''],[new GLatLng(42.28757,-83.01985), ''],[new GLatLng(42.27296,-83.04867), ''],[new GLatLng(42.27377,-83.01468), ''],[new GLatLng(42.31577,-83.02916), ''],[new GLatLng(42.31383,-83.03463), ''],[new GLatLng(42.28286,-83.01093), ''],[new GLatLng(42.26287,-82.97131), ''],[new GLatLng(42.26279,-82.97013), ''],[new GLatLng(42.24829,-83.02101), ''],[new GLatLng(42.274,-83.04995), ''],[new GLatLng(42.27989,-83.00886), ''],[new GLatLng(42.31962,-83.03943), ''],[new GLatLng(42.2781,-83.05215), '']]; var latlngbounds = new GLatLngBounds(); var icon = new GIcon(); icon.image = "/images/hotel.png"; icon.shadow = "/images/hotelshadow.png"; icon.iconSize = new GSize(20, 34); icon.shadowSize = new GSize(37, 34); icon.iconAnchor = new GPoint(9, 34); icon.infoWindowAnchor = new GPoint(9, 2); map1 = new GMap2(document.getElementById('HotelMap')); map1.addControl(new GSmallMapControl()); map1.addControl(new GMenuMapTypeControl()); map1.setCenter(new GLatLng(0,0), 0); for (var i = 0; i < latlng1.length; i++) { (function () { var marker = new GMarker(latlng1[i][0],icon); var html = latlng1[i][1]; GEvent.addListener(marker, 'click', function() { marker.openInfoWindowHtml(html); }); map1.addOverlay(marker); latlngbounds.extend(latlng1[i][0]); })(); } map1.setCenter(latlngbounds.getCenter(), map1.getBoundsZoomLevel(latlngbounds)); } } GEvent.addDomListener(window, 'load', map1_initialize);