Marking out geography shapes on Virtual Earth
In Chapter 5 of "Beginning Spatial with SQL Server 2008", I show you how to use Virtual Earth as a drawing canvas onto which you can draw Points, LineStrings, and Polygons, and then retrieve the WKT of the shape coordinates for use in SQL Server 2008.
Because Virtual Earth is a flat 2d map, this technique works very well for the geometry datatype, but what about the geography datatype?
Suppose that you had drawn a LineString connecting the points at (34,-118) and (51.5,0) representing a flight from Los Angeles International airport to Heathrow, London.
In Virtual Earth, the LineString will connect these two points with a straight line drawn on the map, as follows:

This is equivalent to the geometry LineString in SQL Server defined as follows:
geometry::STLineFromText('LINESTRING(-118 34, 0 51.5)', 4326).
However, this does not represent the shortest path between these points as would be calculated by the geography datatype, geography::STLineFromText('LINESTRING(-118 34, 0 51.5)', 4326), which would actually look like this when shown on a flat map:

To understand why the geography LineString looks like this, remember that the geography datatype performs calculations on an elliptical model (i.e. a globe) rather than on a flat map. When you see this same geography route plotted in Virtual Earth 3D mode, you can see that it actually represents the correct shortest route between Los Angeles and Heathrow on the round Earth.

I've updated the example on this site to allow you to define both geography and geometry instances (both using SRID 4326) that will be displayed correctly in both 2d and 3d modes of Virtual Earth.

