var map = null; var locs = new Array; var pinid=0; var defaultView='r'; var dashboardSize='Small'; //Normal, Small or Tiny var tileBuffer=0; var center =null; var zoom =null; var layer=null; /* function GetMap(){ try{ map = new VEMap('myMap'); // map.SetDashboardSize(getDashboardObj(dashboardSize)); map.HideDashboard(); // map.onLoadMap = function(){ center=map.GetCenter(); zoom=map.GetZoomLevel();}; // defaultView=parent.document.getElementById("defaultView").value; // map.LoadMap(null, null, defaultView, null, null, false); // var options = new VEMapOptions(); // options.EnableBirdseye = false; // map.LoadMap(null, null, defaultView, null, null, false, 0, options); map.LoadMap(null, null, defaultView); map.ClearInfoBoxStyles(); AddMyControl(); AddPushpin(); map.AttachEvent("onclick",ClickHandler); }catch(e){ // alert(e.faultCode?e.faultCode:e.message?e.message:e); } } */ function GetMap() { try{ map = new VEMap('myMap'); map.HideDashboard(); map.onLoadMap = function(){ center=map.GetCenter(); zoom=map.GetZoomLevel();}; map.LoadMap(new VELatLong(0,0), 11 ,'r' ,false); AddMyControl(); map.ClearInfoBoxStyles(); AddPushpin(); //map.AttachEvent("onclick",ClickHandler); //store the center and zoom for the resetMap function center=map.GetCenter(); zoom=map.GetZoomLevel(); }catch(e){} } function ClickHandler(e) { if (e.rightMouseButton) { var latlng = map.PixelToLatLong(new VEPixel(e.mapX, e.mapY)); //alert (latlng); GetLocationInfo(latlng); } } function GetLocationInfo(latlng) { var shape = new VEShape(VEShapeType.Pushpin, latlng); shape.SetCustomIcon("
#
"); shape.SetTitle("New Location"); shape.SetDescription("Latitude: "+latlng.Latitude+"
Longitude: "+latlng.Longitude); map.AddShape(shape); // document.getElementById("lat").value = latlng.Latitude; // document.getElementById("long").value = latlng.Longitude; } function AddPushpin(){ try{ var propsSize =parent.document.getElementById('propsSize').value; var poilatlng =parent.document.getElementById('poilatlng').value; //alert(parent.document.getElementById("checkInDate").value); var nodates=(parent.document.getElementById("checkInDate").value =="mm/dd")? true : false; if (!nodates) { nodates=(parent.document.getElementById("checkInDate").value =="dd/mm")? true : false; } var points = new Array(); var shapes = new Array(); var myPropertyLatLng = poilatlng.split ( ';' ); for(var i=myPropertyLatLng.length -2;i>=0;i--) { var latlng = myPropertyLatLng[i]; var proplat = latlng.split ( ',' ); var lat =null; var lng =null; var shape = null; for(j=0;j"; var amenitiesList =parent.document.getElementById("AmenitiesList"+(prop_cnt)).innerHTML; if(aImage==""){ altImage= mnPhoto.replace(/[0-9][0-9].*/, 'SRBrandLogo.gif'); }else{ altImage= mnPhoto.replace(/[0-9][0-9].*/, aImage); } var text = "View Rooms & Rates"; /*if (brandId=="KG") { text = "Check Rates"; } if (brandId=="TL") { text = "Show Rates & Rooms"; } */ text = (availability!="")?text:"Check Alternative Dates"; text = (brandId=="WY")? "Check Availability & Rates" : text; var customIcon ="
"+propNumber+"
"; var pop= ''; if (navigator.appName == "Microsoft Internet Explorer") { pop = '
' + '
Photo of Property'; }else{ pop = '
' + '' + '' + '' + '' + ''; if (!nodates && brandId!='WY') { var statusText=parent.document.getElementById("statusText"+(prop_cnt)).value; pop+= ''; } pop+= '
Photo of Property'; } if (brandId!='WY') { pop+= '
Photo Tour'; } pop+='

Tier
'+propNumber+'.'+propName+'' + '' + '' + '

'+address+address2+city+stateCode+zip+country+'
'+phone+'
 
'+text+'
'+amenitiesList+'
' + '
'+distance+'
'; shape.SetDescription(pop); shape.SetCustomIcon(customIcon); shape.SetZIndex(1010,1010); shapes.push(shape); var point =new VELatLong(lat,lng); points.push(point); } map.AddShape(shapes); map.SetMapView(points); if (propsSize < 2 && map.GetZoomLevel() > 12) { // alert(map.GetZoomLevel()); map.SetZoomLevel(12); } }catch(e){ // alert(e.faultCode?e.faultCode:e.message?e.message:e); } } function resetMap(){ map.SetMapStyle(VEMapStyle.Road); map.SetCenterAndZoom(center, zoom); } function resetMap2(){ map2.SetMapStyle(VEMapStyle.Road); map2.SetCenterAndZoom(center2, zoom2); } function getDashboardObj(dashboardSize){ if (dashboardSize == 'Normal'){ dashboardObj = VEDashboardSize.Normal; }else if (dashboardSize == 'Small'){ dashboardObj = VEDashboardSize.Small; }else if (dashboardSize == 'Tiny'){ dashboardObj = VEDashboardSize.Tiny; }else{ dashboardObj = VEDashboardSize.Normal; } return dashboardObj; }