( rue, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); google.maps.event.addListener(map, 'click', function() { infowindow.close(); }); setMarkers(map, hotels); } var icons = new Array(); icons["red"] = new google.maps.MarkerImage("mapIcons/marker_red.png", // This marker is 20 pixels wide by 34 pixels tall. new google.maps.Size(20, 34), // The origin for this image is 0,0. new google.maps.Point(0,0), // The anchor for this image is at 9,34. new google.maps.Point(9, 34)); function getMarkerImage(iconColor) { if ((typeof(iconColor)=="undefined") || (iconColor==null)) { iconColor = "red"; } if (!icons[iconColor]) { icons[iconColor] = new google.maps.MarkerImage("/images/m/marker"+ iconColor +".png", // This marker is 20 pixels wide by 34 pixels tall. new google.maps.Size(20, 34), // The origin for this image is 0,0. new google.maps.Point(0,0), // The anchor for this image is at 6,20. new google.maps.Point(9, 34)); } return icons[iconColor]; } // Marker sizes are expressed as a Size of X,Y // where the origin of the image (0,0) is located // in the top left of the image. // Origins, anchor positions and coordinates of the marker // increase in the X direction to the right and in // the Y direction down. var iconImage = new google.maps.MarkerImage('mapIcons/marker_red.png', // This marker is 20 pixels wide by 34 pixels tall. new google.maps.Size(20, 34), // The origin for this image is 0,0. new google.maps.Point(0,0), // The anchor for this image is at 9,34. new google.maps.Point(9, 34)); var iconShadow = new google.maps.MarkerImage('/images/shadow50.png', // The shadow image is larger in the horizontal dimension // while the position and offset are the same as for the main image. new google.maps.Size(37, 34), new google.maps.Point(0,0), new google.maps.Point(9, 34)); // Shapes define the clickable region of the icon. // The type defines an HTML <area> element 'poly' which // traces out a polygon as a series of X,Y points. The final // coordinate closes the poly by connecting to the first // coordinate. var iconShape = { coord: [9,0,6,1,4,2,2,4,0,8,0,12,1,14,2,16,5,19,7,23,8,26,9,30,9,34,11,34,11,30,12,26,13,24,14,21,16,18,18,16,20,12,20,8,18,4,16,2,15,1,13,0], type: 'poly' }; var infowindow = new google.maps.InfoWindow( { size: new google.maps.Size(200,40) }); function createMarker(map, latlng, label, html, color, subbrand) { var contentString = '
'+label+'
'+html+"
"; var marker = new google.maps.Marker({ position: latlng, map: map, shadow: iconShadow, icon: getMarkerImage(color), shape: iconShape, // title: label, zIndex: Math.round(latlng.lat()*-100000)<<5 }); google.maps.event.addListener(marker, 'click', function() { infowindow.setContent(contentString); infowindow.open(map,marker); }); google.maps.event.addListener(marker, 'mouseover', function() { infowindow.setContent(contentString); infowindow.open(map,marker); }); } /** * Data for the markers consisting of a name, a LatLng and a zIndex for * the order in which these markers should display on top of each * other. */ var hotels = [ ['Staybridge Suites Cheyenne', 41.163568, -104.799144, "1",'5109 Frontier Mall Drive, Cheyenne, WY 82009','sb'], ['TownePlace Suites Cheyenne', 41.126159, -104.834028, "2",'1710 West Lincolnway, Cheyenne, WY 82001','ts'], ['SpringHill Suites Cheyenne', 41.117717, -104.80854, "3",'416 W Fox Farm Road, Cheyenne, WY 82007','ss'], ['Holiday Inn Express Hotel & Suites Cheyenne', 41.124628, -104.8445519, "4",'1741 Fleischli Parkway, Cheyenne, WY 82001','ex'], ['Candlewood Suites Cheyenne', 41.123944, -104.843639, "5",'2335 Tura Parkway, Cheyenne, WY 82001','cw'], ['SureStay Plus Hotel by Best Western Cheyenne', 41.125191, -104.845374, "6",'1781 Fleischli Parkway, Cheyenne, WY 82001','bw'], ['Best Western Plus Frontier Inn', 41.137571, -104.70488, "7",'8101 Hutchins Drive, Cheyenne, WY 82007','bw'], ['Fairfield Inn Cheyenne', 41.159319, -104.807274, "8",'1415 Stillwater Avenue, Cheyenne, WY 82001','fi'], ['Fairfield Inn & Suites Cheyenne Southwest/Downtown Area', 41.125202, -104.834992, "9",'1820 W Lincolnway, Cheyenne, WY 82001','fi'], ['Comfort Inn & Suites Cheyenne', 41.116433, -104.805117, "10",'201 W Fox Farm Road, Cheyenne, WY 82001','ci'], ['Comfort Suites Cheyenne', 41.168108, -104.837401, "11",'5401 Walker Road, Cheyenne, WY 82009','cs'], ['Quality Inn Cheyenne I-25 South', 41.098022, -104.852524, "12",'2245 Etchepare Drive, Cheyenne, WY 82007','qi'], ['Microtel Inn & Suites by Wyndham Cheyenne', 41.1275904, -104.8291204, "13",'1400 W Lincolnway, Cheyenne, WY 82001','mt'], ['Days Inn by Wyndham Cheyenne', 41.122509, -104.843929, "14",'2360 W Lincoln Way, Cheyenne, WY 82001','di'], ['Travelodge by Wyndham Cheyenne', 41.158707, -104.802359, "15",'1625 Stillwater Avenue, Cheyenne, WY 82009','tl'], ['Super 8 by Wyndham Cheyenne', 41.125201, -104.835940, "16",'1900 W Lincolnway, Cheyenne, WY 82001-3316','se'], ['Rodeway Inn Cheyenne', 41.158124, -104.660958, "17",'12500 I-80 East, Cheyenne, WY 82009','ri'], ['Motel 6 Cheyenne', 41.125605, -104.838858, "18",'1735 Westland Road, Cheyenne, WY 82001','m6'], ]; function setMarkers(map, locations) { // Add markers to the map for (var i = 0; i < locations.length; i++) { var beach = locations[i]; var myLatLng = new google.maps.LatLng(beach[1], beach[2]); var marker = createMarker(map,myLatLng,beach[0],beach[4],beach[3],beach[5]); } } //]]>
Arizona California Colorado Idaho Nevada New Mexico Oregon Texas Utah Wyoming Slot Canyons Follow americansouthwest.net on Facebook