var map; var gdir; //var geocoder = null; //var addressMarker; Ext.onReady(function() { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map")); map.setCenter(new GLatLng(33.752558, -116.429441), 11); // Center on Rancho Mirage map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.enableScrollWheelZoom(); gdir = new GDirections(map, document.getElementById("directions")); GEvent.addListener(gdir, "error", handleErrors); var iconAguaCalienteResort = new GIcon(); iconAguaCalienteResort.image = '/assets/images/map_icons/hotels/agua_caliente_resort.png'; iconAguaCalienteResort.iconSize = new GSize(143, 34); iconAguaCalienteResort.iconAnchor = new GPoint(0, 34); iconAguaCalienteResort.infoWindowAnchor = new GPoint(0, 0); var iconCountryInnAndSuites = new GIcon(); iconCountryInnAndSuites.image = '/assets/images/map_icons/hotels/country_inn_and_suites.png'; iconCountryInnAndSuites.iconSize = new GSize(136, 34); iconCountryInnAndSuites.iconAnchor = new GPoint(0, 0); iconCountryInnAndSuites.infoWindowAnchor = new GPoint(0, 0); var iconHiltonGardenInn = new GIcon(); iconHiltonGardenInn.image = '/assets/images/map_icons/hotels/hilton_garden_inn.png'; iconHiltonGardenInn.iconSize = new GSize(121, 34); iconHiltonGardenInn.iconAnchor = new GPoint(121, 34); iconHiltonGardenInn.infoWindowAnchor = new GPoint(0, 0); var iconMotel6 = new GIcon(); iconMotel6.image = '/assets/images/map_icons/hotels/motel_6.png'; iconMotel6.iconSize = new GSize(151, 34); iconMotel6.iconAnchor = new GPoint(0, 34); iconMotel6.infoWindowAnchor = new GPoint(0, 0); var iconRanchoLasPalmasResort = new GIcon(); iconRanchoLasPalmasResort.image = '/assets/images/map_icons/hotels/rancho_las_palmas_resort.png'; iconRanchoLasPalmasResort.iconSize = new GSize(172, 34); iconRanchoLasPalmasResort.iconAnchor = new GPoint(0, 34); iconRanchoLasPalmasResort.infoWindowAnchor = new GPoint(0, 0); var iconRitzCarlton = new GIcon(); iconRitzCarlton.image = '/assets/images/map_icons/hotels/ritz_carlton.png'; iconRitzCarlton.iconSize = new GSize(113, 34); iconRitzCarlton.iconAnchor = new GPoint(0, 34); iconRitzCarlton.infoWindowAnchor = new GPoint(0, 0); var iconWestinMissionHillsResort = new GIcon(); iconWestinMissionHillsResort.image = '/assets/images/map_icons/hotels/westin_mission_hills_resort.png'; iconWestinMissionHillsResort.iconSize = new GSize(175, 34); iconWestinMissionHillsResort.iconAnchor = new GPoint(0, 34); iconWestinMissionHillsResort.infoWindowAnchor = new GPoint(0, 0); var iconWestinMissionHillsVillas = new GIcon(); iconWestinMissionHillsVillas.image = '/assets/images/map_icons/hotels/westin_mission_hills_villas.png'; iconWestinMissionHillsVillas.iconSize = new GSize(169, 34); iconWestinMissionHillsVillas.iconAnchor = new GPoint(0, 0); iconWestinMissionHillsVillas.infoWindowAnchor = new GPoint(0, 0); var iconShop = new GIcon(); iconShop.image = '/assets/images/map_icons/shop.png'; iconShop.iconSize = new GSize(20, 34); iconShop.iconAnchor = new GPoint(10, 34); iconShop.infoWindowAnchor = new GPoint(0, 0); var point = new GLatLng(33.801586, -116.417596); var html = 'Westin Mission Hills Resort & Spa
71-333 Dinah Shore Drive,
Rancho Mirage, CA. 92270
Phone - (760) 328-5955'; map.addOverlay(createMarker("hotels", point, html, iconWestinMissionHillsResort)); var point = new GLatLng(33.7444, -116.408124); var html = 'Rancho Las Palmas Resort & Spa
41-000 Bob Hope Drive,
Rancho Mirage, CA. 92270
Phone - (866) 423-1195'; map.addOverlay(createMarker("hotels", point, html, iconRanchoLasPalmasResort)); var point = new GLatLng(33.81458, -116.410417); var html = 'Agua Caliente Casino - Resort - Spa
32-250 Bob Hope Drive,
Rancho Mirage, CA. 92270
Phone - (888) 999-1995'; map.addOverlay(createMarker("hotels", point, html, iconAguaCalienteResort)); var point = new GLatLng(33.76585, -116.459281); var html = 'The Ritz-Carlton, Rancho Mirage - Opens in 2010
68-900 Frank Sinatra Drive,
Rancho Mirage, CA. 92270
Phone - (760) 321-8282'; map.addOverlay(createMarker("hotels", point, html, iconRitzCarlton)); var point = new GLatLng(33.742643, -116.413411); var html = 'Hilton Garden Inn Palm Springs / Rancho Mirage
71-700 Hwy 111,
Rancho Mirage, CA. 92270
Phone - (760) 776-9700'; map.addOverlay(createMarker("hotels", point, html, iconHiltonGardenInn)); var point = new GLatLng(33.775288, -116.450022); var html = 'Motel 6 Rancho Mirage
69-570 Highway 111,
Rancho Mirage, CA. 92270
Phone - (760) 324-8475'; map.addOverlay(createMarker("hotels", point, html, iconMotel6)); var point = new GLatLng(33.742297, -116.413106); var html = 'Country Inn & Suites by Carlson
71-730 Highway 111,
Rancho Mirage, CA. 92270
Phone - (760) 340-5516'; map.addOverlay(createMarker("hotels", point, html, iconCountryInnAndSuites)); var point = new GLatLng(33.801672, -116.409893); var html = 'Westin Mission Hills Resort & Villas
71777 Dinah Shore Drive,
Rancho Mirage, CA. 92270
Phone - (760) 770-8250'; map.addOverlay(createMarker("hotels", point, html, iconWestinMissionHillsVillas)); var point = new GLatLng(33.74136, -116.412272); var html = 'The River
71-800 Highway 111,
Rancho Mirage, CA. 92270'; map.addOverlay(createMarker("shop", point, html, iconShop)); } function handleErrors(){ if (gdir.getStatus().code == G_GEO_UNKNOWN_ADDRESS) alert("No corresponding geographic location could be found for one of the specified addresses. This may be due to the fact that the address is relatively new, or it may be incorrect.\nError code: " + gdir.getStatus().code); else if (gdir.getStatus().code == G_GEO_SERVER_ERROR) alert("A geocoding or directions request could not be successfully processed, yet the exact reason for the failure is not known.\n Error code: " + gdir.getStatus().code); else if (gdir.getStatus().code == G_GEO_MISSING_QUERY) alert("The HTTP q parameter was either missing or had no value. For geocoder requests, this means that an empty address was specified as input. For directions requests, this means that no query was specified in the input.\n Error code: " + gdir.getStatus().code); else if (gdir.getStatus().code == G_GEO_BAD_KEY) alert("The given key is either invalid or does not match the domain for which it was given. \n Error code: " + gdir.getStatus().code); else if (gdir.getStatus().code == G_GEO_BAD_REQUEST) alert("A directions request could not be successfully parsed.\n Error code: " + gdir.getStatus().code); else alert("An unknown error occurred."); } });