//' + a + '' + '' + '' + c + ''; } function load() { //alert("/mdap_images/gmap_hicentral/xml2.php?page="+page+"&prev="+prev+"&order="+order+"&type="+type+"&status="+mystatus); if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map_canvas")); map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); //map.addControl(new GOverviewMapControl()); map.setCenter(new GLatLng(37.4419, -122.1419), 10); bounds = new GLatLngBounds(); ew = new EWindow(map, E_STYLE_7); map.addOverlay(ew); GDownloadUrl("gmap/xml_sold.php?prev="+prev+"&page="+page, function(data, responseCode) { //GDownloadUrl("/mdap_images/gmap_hicentral/xml3.php?page="+page+"&prev="+prev+"&order="+order+"&type="+type+"&status="+mystatus+"&bath="+bath+"&bed="+bed+"&pricemin="+pricemin+"&pricemax="+pricemax+"&landarea="+landarea+"&propcondition="+propcondition+"&frontage="+frontage+"&interiorsqft="+interiorsqft+"&topography="+topography+"&builtype="+builtype+"&parking="+parking+"&landuses="+landuses+"&parkstalls="+parkstalls+"&bldgtype="+bldgtype+"&leasetype="+leasetype+"&units="+units+"&constype="+constype+"&extras="+extras+"&myzip="+myzip+"&mycity="+mycity+"&neighborhood="+neighborhood+"&myviews="+myviews+"&zoning="+zoning+"&duration="+duration, function(data, responseCode) { var xml = GXml.parse(data); markers = xml.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { addy = markers[i].getAttribute("address"); addwonum = markers[i].getAttribute("address2"); status[addy] = markers[i].getAttribute("status"); key[addy] = markers[i].getAttribute("key"); title[addy] = markers[i].getAttribute("title"); geocoder.getLocations(addy, addAddressToMap); sleep(300); } }); } } function sleep(delay) { var start = new Date().getTime(); while (new Date().getTime() < start + delay); } function addAddressToMap(response) { if (!response || response.Status.code != 200) { //alert("Sorry, we were unable to geocode that address"); } else { place = response.Placemark[0]; point = new GLatLng(place.Point.coordinates[1], place.Point.coordinates[0]); lat = place.Point.coordinates[1]; lng = place.Point.coordinates[0]; marker = new GMarker(point, icon_red); color = '#65e265'; marker.address = response.name; var detail = document.getElementById("property_"+key[response.name]).innerHTML; var html = pretty(response.name,color,detail,key[response.name]); map.addOverlay(marker); createMarker(marker,html,point); GEvent.trigger(marker,"click"); if(markers.length > 1) { fitMap(point); sleep(300); } } } function findLocation(address,id) { geocoder.getLocations(address, addAddressToMap); } function fitMap( points ) { bounds.extend(points); map.setZoom(map.getBoundsZoomLevel(bounds)); map.setCenter(bounds.getCenter()); } //]]>