Featured Mashup: Eppraisal real estate valuation tools
Where? http://eppraisal.com/
Developer: Saris Technologies
The Site
Launched in 2006 by Saris Technologies, eppraisal.com is focused on helping consumers make relocation or real estate investment decisions through easy-to-use, intuitive online analytical tools. The site’s localized information enables members to personalize their home pages with news, market trends, lifestyle, and professional resources specific to their neighborhood.
Why the Windows Live Platform?
Eppraisal.com uses Microsoft® Virtual Earth™, part of the Windows Live™ Platform of Internet services, to provide site visitors with interactive mapping. The choice of Virtual Earth resulted from several strong advantages, including bird’s eye view (an enhanced 3D imaging option available only with Virtual Earth), favorable licensing terms, clear web service API’s, and comprehensive on-line documentation.
Programming Environment
Saris Technologies developers use a number of Microsoft development tools including the .NET framework with ASP.net and AJAX, and Microsoft SQL Server. The primary code is developed in Microsoft Visual C#.
Under the Hood
The following code shows how to recursively map a set of real estate “comparables” using Virtual Earth geocoding. Pushpin icons for the comparables are added to a separate layer to facilitate easy showing/hiding.
addCompInfo : function(comps)
{ var addPins = function()
{
this.compsLayer = new VEShapeLayer();
this.compsLayer.SetTitle('Comparable Properties');
var i = 0;
var mapCallback = function(a,b,c,d,e)
{
if (i >= comps.length) return;
if ((c != null) && (c[0] != null))
{
var compIcon = "<div class='comp_pin'><div class='pin_text'>" + (i + 1).toString() + "</div></div>";
var loc = c[0].LatLong;
var pin = new VEShape(VEShapeType.Pushpin, loc);
pin.SetDescription(this.compPinTemplate.evaluate(
{
Icon: compIcon,
StreetAddress: comps[i].Comparable.PROPERTY._StreetAddress,
City: comps[i].Comparable.PROPERTY._City,
State: comps[i].Comparable.PROPERTY._State,
PostalCode: comps[i].Comparable.PROPERTY._PostalCode,
Bedrooms: comps[i].Comparable.PROPERTY._PROPERTY_CHARACTERISTICS._IMPROVEMENTS._ROOM_COUNT._TotalBedroomsCount,
Bathrooms: comps[i].Comparable.PROPERTY._PROPERTY_CHARACTERISTICS._IMPROVEMENTS._ROOM_COUNT._TotalBathsCount,
LastSaleDate: Util.formatDate(comps[i].Comparable.PROPERTY._PROPERTY_HISTORY._SALES_HISTORY[0]._LastSalesDate)
}));
pin.SetCustomIcon(compIcon);
this.compsLayer.AddShape(pin);
}
i++;
if (i < comps.length)
{
this.map.Find(
null,
comps[i].Comparable.PROPERTY._StreetAddress + ', ' +
comps[i].Comparable.PROPERTY._City + ', ' +
comps[i].Comparable.PROPERTY._State + ' ' +
comps[i].Comparable.PROPERTY._PostalCode,
null, null, null, null, false, false, false, false,
mapCallback);
}
}.bind(this);
this.map.Find(
null,
comps[i].Comparable.PROPERTY._StreetAddress + ', ' +
comps[i].Comparable.PROPERTY._City + ', ' +
comps[i].Comparable.PROPERTY._State + ' ' +
comps[i].Comparable.PROPERTY._PostalCode,
null, null, null, null, false, false, false, false,
mapCallback);
this.map.AddShapeLayer(this.compsLayer);
$('ShowRecentSalesCheck').checked = true;
Form.Element.enable($('ShowRecentSalesCheck'));
}.bindAsEventListener(this)
if (this.compPinTemplate == null)
{
new Ajax.Request('JS/templates/ComparablePropertyPin.jst', {
method: 'get',
onComplete: function(transport)
{
if (200 == transport.status)
{
this.compPinTemplate = new Template(transport.responseText);
if (this.subjectPropertyLayer == null)
window.setTimeout(this.addCompInfo.bind(this, comps), 100);
else
addPins();
}
}.bindAsEventListener(this)
});
}
else
{
if (this.subjectPropertyLayer == null)
window.setTimeout(this.addCompInfo.bind(this, comps), 100);
else
addPins();
}
}