//var centerPoint = new GLatLng(39.759991,-104.988098); //var rect; function callAgainCity(address, info, titleView, imgSrcName, reUrl, zoom){ showAddress(address, info, titleView, imgSrcName, reUrl, zoom) } function showAddress(address, info, titleView, imgSrcName, reUrl, zoom) { var flag = 0; if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) { //alert(address); if(flag == 0){ var addr = address.split(","); address = addr[1] + ", " + addr[2]; //alert(address); callAgainCity(address, info, titleView, imgSrcName, reUrl, zoom); } //alert(address + " not found"); } else { //alert(point); flag = 1; var opts = { title: titleView + " Propertie(s)" }; map.setCenter(point, zoom); var marker = new GMarker(point, opts); map.addOverlay(marker); //map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); var extLargeMapControl = new ExtLargeMapControl(); map.addControl(extLargeMapControl); marker.setImage("https://www.secure.rentpropertyanywhere.com/images/mapIcon.gif"); GEvent.addListener(marker, "click", function() { var WINDOW_HTML2 = '

'+ titleView +'

'+ imgSrcName + info +'
'; CreateWindow(WINDOW_HTML2, ''); }); //marker.openInfoWindowHtml(WINDOW_HTML); } } ); } } function callAgainDetail(address, info, titleView, imgSrcName, reUrl, zoom){ showAddressDetail(address, info, titleView, imgSrcName, reUrl, zoom); } function showAddressDetail(address, info, titleView, imgSrcName, reUrl, zoom) { var flag = 0; //address('okkkkk'); if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) { if(flag == 0){ var addr = address.split(","); if(addr.length == 4){ address = addr[1] + ", " + addr[2] + ", " + addr[3]; callAgainDetail(address, info, titleView, imgSrcName, reUrl, zoom); } if(addr.length == 3){ address = addr[1] + ", " + addr[2]; callAgainDetail(address, info, titleView, imgSrcName, reUrl, zoom); } } //alert(address + " not found"); } else { flag = 1; //alert(point); map.setCenter(point, zoom); var marker = new GMarker(point); map.addOverlay(marker); map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); //var extLargeMapControl = new ExtLargeMapControl(); //map.addControl(extLargeMapControl); marker.setImage("https://www.secure.rentpropertyanywhere.com/images/mapIcon.gif"); GEvent.addListener(marker, "click", function() { //var WINDOW_HTML2 = '

'+ titleView +'

'+ imgSrcName + info +'
'; //CreateWindow(WINDOW_HTML2, ''); marker.openInfoWindowHtml(titleView); }); } } ); } } var crc = 0; function showAddressList(address, info, title, imgSrcName, reUrl, zoom, optsVal, crc) { if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) { //alert(address + " not found"); } else { //alert(point); var opts = { title: optsVal + " Propertie(s)" }; map.setCenter(point, zoom); var marker = new GMarker(point, opts); map.addOverlay(marker); //map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); var extLargeMapControl = new ExtLargeMapControl(); map.addControl(extLargeMapControl); marker.setImage("https://www.secure.rentpropertyanywhere.com/images/mapIcon.gif"); GEvent.addListener(marker, "click", function() { //alert(crc); sendValueReg1(crc); }); //GEvent.addListener(marker, "click", function() { // var WINDOW_HTML2 = '

'+ title +'

'+ info +'
'; // CreateWindow(WINDOW_HTML2, ''); // }); //marker.openInfoWindowHtml(WINDOW_HTML); } } ); } } function callAgain(address, info, title, imgSrcName, reUrl, zoom, optsVal, crc, regID) { showAddressListForRegion(address, info, title, imgSrcName, reUrl, zoom, optsVal, crc, regID); } var regID = 0; function showAddressListForRegion(address, info, title, imgSrcName, reUrl, zoom, optsVal, crc, regID) { var flag = 0; if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) { if(flag == 0){ var addr = address.split(","); //alert(address); address = addr[1] + ", " + addr[2]; callAgain(address, info, title, imgSrcName, reUrl, zoom, optsVal, crc, regID); } //alert(address + " not found"); } else { //alert(point); flag = 1; var opts = { title: optsVal + " Propertie(s)" }; map.setCenter(point, zoom); var marker = new GMarker(point, opts); map.addOverlay(marker); //map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); var extLargeMapControl = new ExtLargeMapControl(); map.addControl(extLargeMapControl); marker.setImage("https://www.secure.rentpropertyanywhere.com/images/mapIcon.gif"); GEvent.addListener(marker, "click", function() { //alert(crc); sendValueCity(crc,regID); }); } } ); } } function PinClicked( latlng ) { var pixelPoint = map.fromLatLngToDivPixel( latlng ); var createAt = map.fromLatLngToContainerPixel( latlng ); if ( createAt.x < 0 || createAt.y < 0 || createAt.x > 700 || createAt.y > 400 ) { return; } var pixelPointKey = Math.floor( pixelPoint.x / markerManager.gridResolution ) + "x" + Math.floor( pixelPoint.y / markerManager.gridResolution ); var properties = markerManager.closeMarkers[ pixelPointKey ]; propertyHtml = ""; for( var j = 0; j < properties.length; j++ ) { var property = properties[j]; propertyHtml += CreatePropertyHtmlFromMarker( property ); if ( j == 7 ) { break; } } CreateWindow( propertyHtml, createAt ); } function CreateWindow( windowHtml, createAt ) { left = createAt.x + 8; var mclass = 'left'; if ( createAt.x > 350 ) { left = createAt.x - 326; mclass = 'right'; } var outputWindow = "
"; outputWindow += windowHtml; outputWindow += "
"; //alert(outputWindow); document.getElementById( 'map-info-container' ).innerHTML = outputWindow; //verticalAccordion = new accordion('map-info'); //verticalAccordion.activate($$('#map-info .accordion_toggle')[0]); ShowInfoWindow(); } function ShowInfoWindow() { document.getElementById( 'map-info-container' ).style.display = 'block'; } function HideInfoWindow() { document.getElementById( 'map-info-container' ).style.display = 'none'; }