A new version of Windows Live Local released on Sept 12th, 06 with exciting new features.

One new exciting feature is the support of Map Cruncher.

What exactly is Map Cruncher?

It is having your own map mashup of an external layer of tiles over the base VE Map layer. See a sample of mashup of Seattle Bus Route.

You can now have your own layer of Bicycle maps, Bus maps, Train maps, national park maps, university campus.. The list is endless.

This cool feature is available with loads of simplicity.

Let us start with building our own mashup layer.

First let us pick up the source of the external layer i.e. the layer which we will overlay over the base VE MAP.

I have currently picked up the following PDF file http://transit.metrokc.gov/tops/bus/area_images/MetroTransMap.pdf

Next we will generate tiles for this Metro Transit layer using MSR Map Cruncher. You can select the max zoom level when we generate tiles using MSR Map Cruncher. I have currently selected the max zoom level to be level 15.

Now let us move forward. We are now all set with tiles for an additional layer. Now let us create our interactive map with the help of Interactive Virtual Earth APIs. More about Virtual Earth APIs can be read at Virtual Earth Interactive SDK.

Virtual Earth APIs are exposed as a set of JavaScript classes that can be included on your HTML or ASPX page using the script tag:

   <script src="http://dev.virtualearth.net/mapcontrol/v3/MapControl.js">
   </script>

Now let us create our basic map with the Metro Transit layer.

<html>
    <head>
      <title>Map Cruncher using Virtual Earth</title>
          <script src= "
http://dev.virtualearth.net/mapcontrol/v3/MapControl.js"></script> 

     <script> 
            var vemap = null;

            function GetMap() 
            {
                try
                {
                        map = new VEMap('myMap');
                        map.SetDashboardSize(VEDashboardSize.Tiny);
                        map.LoadMap(new VELatLong(47.395, -122.25), 11 ,'r' ,false);
                }
                catch(ex)
                {
                       alert(ex.message);
                } 
          }
    </script>

</head>

<body onload="GetMap();">
      <div id='myMap' style="position:relative; width:1000px; height:800px;"></div>
</body>

</html>

 

To add custom tiles to your map, add a VETileSourceSpecification and VETileSource object and assign the opacity and z-Index to the new layer. To learn more about this read ‘Working with Tile Layers’ in the Whats new in the latest release at Virtual Earth Interactive SDK.

       var tileSourceSpec = new VETileSourceSpecification();
       tileSourceSpec.ID = “SeattleTransit”
       tileSourceSpec.TileSource =
http://jbhatia1.members.winisp.net/SeattleTransit/%4.png;
       tileSourceSpec.NumServers = 1;
       tileSourceSpec.MinZoom = 2;
      tileSourceSpec.MaxZoom = 16;

      map.AddTileSource(tileSourceSpec);
      var tileLayer = new VELayerSpecification(VELayerType.VETileSource,"1", "SeattleTransit");
      tileLayer.zIndex = 100;
      tileLayer.Opacity=0.6;

      map.AddLayer(tileLayer);

We are now ready with our Seattle Bus Route mashup. The interactive map mashup can be zoomed in or zoomed out.

So by using Virtual Earth APIs and MSR Map Cruncher we are into a whole new world of overlapping layers of information over a map.

Happy Map Crunching!!!!