Building a Geographic Mashup in Visual Studio

Because it displays in a browser, you build your mashup as a Web application. You can begin by creating an HTML or ASP.NET project from Visual Studio, depending on your application goals. Once your project is created, open a new HTML document. From there, calling maps in Virtual Earth is easy. The SDK, found at http://dev.live.com/virtualearth/sdk/, provides instructions and sample code for displaying basic maps, zooming, placing pushpins, locating places of interest and plotting routes. Most of these simply require an ASP.NET page with calls to specific methods in the map object. At most, it will be three or four lines of code to call the Web page with one of those features.

You’ll find that you can create a simple geographic mashup within a day of using the Virtual Earth map control. For more complex applications it can take a bit longer-but not that much. Using the Virtual Earth map control as the platform and programming interface for your geographic mashups can take you in many different directions, and virtually all of them would be painless.

The Virtual Earth map control API is so easy to use that your biggest problem may well be where to get the data to feed into your mashup. One of the most important purposes of a mashup is to provide data accessibility where it did not exist before. Bringing together data from one location into a map that does not normally have access to that data is one of the keys to producing a compelling mashup. Much data is available through RSS or Atom feeds, in XML format, or in a delimited file. These data sources will be easy to import, parse and apply to a Virtual Earth map.

Microsoft still calls Live and the Virtual Earth API beta software, yet the Map Control is at version 4.0. In practice, what that means is that Microsoft doesn’t offer a Service Level Agreement (SLA) for the site. Instead, it’s a “use at your own risk” technology. It’s likely that Microsoft is not yet ready to provide the mirroring and alternate T1 connections that would make it a bulletproof application component.

So you don’t want to incorporate Virtual Earth into any mission-critical applications just yet. What does that leave? There are vast numbers of applications that can make the lives of users easier without requiring 100 percent uptime. Combining data from corporate travel, for example, you can show employees on business travel where the best corporate hotel rates are, whether they need to rent a car and how much a cab or subway would cost. Workers who are relocating can look for the best school districts in a city and balance those locations against commute times.

Even professionals doing their jobs can benefit, depending on the industry. The value in property and casualty insurance and retail, for example, is in mixing physical locations with business data. Taking some time to build sample applications with Virtual Earth will generate plenty of ideas that will ultimately help your organization. [RedmondDeveloper News]

Leave a Reply