Virtual Earth – DeepEarth – Deep Pockets


Fig 1 Browser Virtual Earth Map control with KML overlay in 3D

Microsoft has released a new set of controls with Silverlight 2.0Beta, including the Virtual Earth Map control, Microsoft.Live.ServerControls.VE. This makes it even easier for cross browser map interface solutions. Silverlight like Flash requires a client side code download, which is available for IE, FireFox, Opera, and Safari. This control introduces VE Map to Microsoft’s version of declarative xml vector graphics in the browser, building on the older work of SVG. Having a VE Map control available cross browser makes VE more competitive with Google Map API. Having a Map control with C# event coding rather than javascript makes life for developers more interesting.

The release of SQL Server 2008 and its spatial extensions makes this control even better from a developers perspective. I am looking forward to seeing how to use Linq Sql to tie together spatial Sql Server datasets and VE map controls.

In order to use this control you must register both a Silverlight and a VE Assembly:

<%@ Register Assembly="System.Web.Silverlight"
Namespace="System.Web.UI.SilverlightControls"
TagPrefix="asp" %>

<%@ Register assembly="Microsoft.Live.ServerControls.VE"
namespace="Microsoft.Live.ServerControls.VE"
tagprefix="ve" %>

Once these are added to your aspx page the control element itself looks like this:

<ve:Map ID="Map1" runat="server"
Height="100%" Width="100%"
ZoomLevel="5" Center-Latitude="38" Center-Longitude="-105"
MapStyle="Shaded" MiniMap="True"
MiniMapYoffset="150" MiniMapXoffset="10"
ShowFindControl="False" DashboardSize="Normal" />

This Map1 element has a host of properties and methods as this subset snapshot shows:


Fig 2 Sampling of <ve:Map> properties in the Visual Studio 2008 properties frame

Code behind cs can include any of the Map1 behaviors:

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Microsoft.Live.ServerControls.VE;

public partial class display_displayVE : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)····
    {
        if (!Page.IsPostBack)········
           {···········
	Map1.Clear();······
	ShapeLayer shplayer = new ShapeLayer();··
	Map1.AddShapeLayer(shplayer);·········

	ShapeSourceSpecification shapeSpec =
		new ShapeSourceSpecification(DataType.ImportXML,
		"http://localhost/brat/kml/Track.kml", shplayer);············

	Map1.ImportShapeLayerData(shapeSpec, "", true);········
         }····
     }
}

Listing 1 sample C# use of Map1 control in code behind

All of the previous VE Javascript SDK Javascript SDK should now have their equivalent in C#. I can use C# to interact with the VE map object including 3D mode, Traffic overlays, Routing, Geocoding, and Location Find, which means a quick easy way to add full featured maps to any business app. This map object is part of the Silverlight 2.0Beta.

Another interesting part of 2.0Beta is the MultiScaleImage or DeepZoom. I played with this earlier in a simplistic fashion but there is a nice feature I didn’t notice, MultiScaleTileSource. This lets a user add an alternative tile source which has lots of applications. Here is a pretty one by Mike Ormund, coding the Mandelbrot Set as a MultiScaleImage with a custom MultiScaleTileSource:


Fig 3 Mandelbrot Set with DeepZoom MultiScaleTileSource

Here is another blog with some details on using the Silverlight MultiScaleImage with MultiScaleTileSource: http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/06/25/10536.aspx

The logical extension of this from a GIS perspective is DeepEarth. DeepEarth is a CodePlex project that applies the MultiScaleTileSource to a Silverlight Map interface. The current version supports the Microsoft Virtual Earth Engine which is interesting in its own right, but can be modified to use other tile source such as Google Map, or any WCS source of your choice. DeepEarth is a fascinating interface. The mousewheel spin zoom and pan is addictive with all the fade in/out animation. This project also has a beautiful little navigation tool, seen in the upper left corner. Clicking on the navigation tool does a little spin sprocket animation to open and close the tool set. However, the real fun is just wheel spin zooming.


Fig 4 Deep Earth Silverlight with MulticaleImage tile sourced to the VE engine. A static image does not do it justice. Deep Earth really invites playing!

Because this directly accesses the VE tile engine it of course will not be legitimate without changes to the Microsoft license restrictions. Here is a quick summary of the commercial VE license:

"Standard version license is $8000 for 1,000,000/year transactions = 8,000,000/year tile renders. Note: no routing in standard
Advanced version license is $15,000 for 1,500,000/year transactions = 12,000,000/year tiles. Includes routing capability"

8,000,000 annual tile renders sounds like a lot of tiles, but playing with the DeepEarth interface and watching tiles roam in and out of view made me wonder. If you put up a public site, for example, what would be an average transaction number per view? I tested a zoom from world down to my house rooftop. Checking against the cached tiles C:\Users\user\AppData\Local\Microsoft\Windows\Temporary Internet Files\Low\Content.IE5 gave 540 tile images. This is just a little bitty zoom though, and I can see an average user stacking up even ten times this amount, but for sake of argument, let’s assume a mere 1000 tile rendering count per site view. Gulp, this leads to only about 8000 user views per year or 22 per day before the overage rates kick in:

"An overage rate (generally $0.01 per transaction) is listed for exceeding the preset number of transactions for use during the term."
Recalling there are 8 render tiles per transaction 0.01/8*1000 = $1.25 per viewer use of the interface!

Even if the Microsoft license were to allow direct VE access, I wonder what will be the chances of a commercial version of this type of interface. It also makes me wonder what kinds of tile rendering counts are generated on the Virtual Earth control? Checking the tile cache after using ve:Map reveals 320 tiles. So roughly 2/3 the count but still $0.80 per view. Seems to be a very useful metric to have before committing to a public website. If my rough calculations are correct then ve:Map could lead to DeepPockets more than DeepEarth.

An alternative to the VE Map control is the now venerable Google Map API recently updated with the Earth mode which gives the browser a bit of the Google Earth 3D view. The license is different:

"Google license: $10,000 annual license fee + page views over 2,000,000/annual"

I guess I would like some clarification on the ‘render transactions’ license of Virtual Earth versus the Google Map license of ‘page views’, but the Google license seems to compare rather favorably based on page views rather than tile renders. I checked the tile cache for a similar navigation using the Google GMap2 object and get about 600 tiles. However, for GMap2 objects this is irrelevant, since there is just a single page view regardless of the navigation tiles downloaded. In this light GMap2 looks really good at $0.005 per user view versus ve:Map at $0.50-$1.00 per user view. This is a 100:1 cost ratio so VE MAP team might need to revisit their pricing. I hope Microsoft can be more competitive eventually, since ve:Map is a nice SIlverlight control. It would also be nice to have some real use metrics for a reality check.


Fig 5 Google Map api control with the new Earth view

Summary:
DeepEarth is a beautiful interface and shows the power of the MultiScaleTileSource, but even if licensing allowed direct access to the VE tile engine or Googles tile engine, it appears cost would make it prohibitive. However, MultiScaleTileSource can be tied to much less ambitious tile engines (free). I am thinking about the WCS ImageMosaic Plugin of the GeoServer project. I imagine adequate performance would require prebuilding a GeoWebCache tile cache. In this scenario the webservice MultiScaleImage can tie into proprietary WCS imagery and still provide the beautiful interactivity of DeepEarth on a more limited scale. Not a bad interface for 6" GDS aerial imagery.

Comments are closed.