Redfin Moves the Earth

There’s a pretty big technology change on today – the integration of Microsoft Virtual Earth as our underlying map platform. Redfin pioneered the use of satellite maps to display information about for sale homes. We built an in-house mapping solution using imagery acquired from various sources (mostly the USGS.) Since then a few other major players have come on the scene in the mapping world and it caused us to reconsider how we want to move Redfin forward.

We evaluated our top options: Google Maps, Microsoft Virtual Earth, or continue to develop our own mapping technology. An “arms race” is happening in the mapping space and it was clear that we don’t want to compete with Google and Microsoft in the map platform arena. We had to exit the map technology business and switch to a web mapping platform that met our needs.

In the end the race was close as the platforms are very similar in many respects, but Microsoft Virtual Earth was the best fit for our requirements. The table below shows how they compare.

  Google Maps Microsoft Virtual Earth
Speed of development ThumbsUp.GIF
API is easy to use
API is easy to use
Ability to support Redfin feature set Overall, our features were supported; parcel outlines were a potential problem. Overall, our features were supported; parcel outlines were a potential problem.Easier to customize for a Redfin experience.
Map imagery (today & future)Photos are the most critical component to searching for homes online. Other than “can we make it work?”, this was the most important component for us. Consistent imagery with reliable updates, but Google’s goal is to be fast, not deep; additional imagery is outside their focus.Example: Houses in San Jose, CA on Google Maps ThumbsUp.GIF
Imagery nationwide is spotty, but for Redfin-supported metros the aerials are good.Example: Houses in San Jose, CA on Virtual EarthVirtual Earth wins by adding “bird’s-eye” imagery for the same location. If as a home shopper, you are trying to decide on whether you liked a house well enough to tour, this view is a significant improvement over the 2-D views. (We didn’t get the Bird’s Eye view in this release, but we will soon.)Microsoft also has some interesting future concepts for street-level imagery that could take our home searching experience even further.
Additional data layers and web services Support for:
- Address/location lookup
- Geocoding
- Cross-street location lookup
- Business/Yellow Page listings
- Driving directions
- Direct integration into Redfin site
ThumbsUp.GIFSupport for:
- Address/location lookup
- Geocoding and batch geocoding
- Business/Yellow Page listings
- Driving directions
- Real-time traffic incidents/congestion
- Points of interest near a location
- Direct integration into Redfin site
- Getting a list of geographic entities for a particular geographic latitude/longitude
Browser support ThumbsUp.GIFFirefox, Internet Explorer, Safari Firefox, Internet ExplorerNo support for the Safari browser on the Mac – this was a hard decision for us, as many of our San Francisco users are Safari users.Fortunately, Firefox 2 does work great on the Mac and is free, but still, not the result we wanted.
Cost ThumbsUp.GIF(Service costs were similar.) ThumbsUp.GIF(Service costs were similar.)

FWIW, I originally had a third “Do-It-Ourselves” column, but the negatives were so obvious I dropped it. The data acquisition and integration development costs were just too high to be a sensible choice for Redfin moving forward.

Having completed the transition from our Flash-based Redfin map to Microsoft Virtual Earth, our principal engineer, Michael, had the following observations about developing for a web mapping platform:

Drawbacks developing with a web mapping platform:
No support for clickable or hoverable polygons for our property lot outlines, an important piece of the Redfin map experience. We use the VE API to paint polygons and pushpins on the map, but there is no VE facility for making those items clickable (i.e. when a user clicks on the parcel, the property information balloon should pop up.) Adding clickability was a MAJOR pain, since VE does not expose access to the underlying drawing primitives or tag the primitives with the ID of the corresponding VE object. It doesn’t look like Google Maps has this support either; so we’d probably have been equally pained with them.

Asynchronous pans and zooms make the programming model difficult. Redfin rolled our own pop-up balloons for property information and therefore Redfin is responsible to placing them in the correct location on the screen. VE pans and zooms asynchronously, so the map will actually sometimes move after we draw and place the balloon, but the balloon won’t move with it because VE doesn’t natively know to move it.

Pros developing with Virtual Earth:
API is very straight-forward and well documented. Getting a demo up and running was trivial, and the object model is clear.
Technical support exists and has been very responsive. We usually received a response within a few hours.

Cons developing with Virtual Earth:

Interoperability with other JavaScript libraries is compromised by VEs approach to the onunload handler. VE replaces the onunload handler with its own function, so that it can do cleanup of any items it has allocated. It appears to throw away any pre-existing onunload handler and other libraries that also require cleanup will be “orphaned” (their onunload handlers will not be called.) This is poor form, and can cause massive memory leaks in Internet Explorer 6.

It was difficult to get VE to show up in the correct location on the screen. Redfin uses absolute positioning and sizing in CSS to set the location of the VE map. Getting this to work correctly with VE took too many hours (and broke again numerous times.)

Microsoft doesn’t offer a “debug” version of their library. The library that they deliver is compressed and somewhat obfuscated, which makes it harder to reverse engineer and debug. We understand why they did that (customers shouldn’t need to be looking under the covers), but it does make debugging a pain for our developers.

Microsoft doesn’t support tying your app to a particular version of Virtual Earth. You can specify a major version (e.g. version 4) but you can’t specify a minor version (e.g. Microsoft reserves the right to swap versions out under their customers at their discretion. In general, this isn’t a problem, but it becomes a problem when you depend on the internal workings of VE. We do hack VE a little (since it doesn’t support all the features we need, as mentioned below), so we’re vulnerable to any VE changes – our site could break without notice due to a Microsoft change, which is… less than ideal, but was a necessary trade-off for the Redfin experience to continue.

Would we make the same decision to go with Virtual Earth if we were starting Redfin today knowing what we know now?
The answer is definitely “Yes.”

With Virtual Earth, Redfin is able to continue to deliver the same Redfin search experience experience with an immediate ability to double our geographic coverage and improve our road maps, quickly expand to more metropolitan areas, and add more features. You’ll see more of the features Virtual Earth provides integrated in future versions of and I’m sure we’ll write more as we go.

We’d love to hear how your experience developing with Microsoft Virtual Earth or Google Maps has compared to ours.

Note: originally posted in the Redfin Corporate Blog here.