Making MapCruncher (MSR version) generated maps work

Virtual Earth just came up with a new release and I noticed that the little app I built using MSR Cruncher wasn't working anymore. Not sure if the commercial version has the same problem. When I tried to load the page, I was getting a "VE is undefined" error. I looked at the existing samples and found they were still working. So I figured "THERE MUST BE A WAY!". I checked the source and found that they were referencing V5 scripts and so basically, I looked for the part of the html page referencing the scripts:

<script src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6" type="text/javascript"></script>  <script src="http://dev.virtualearth.net/mapcontrol/v6/mapcruncher/CrunchControl.js" type="text/javascript"></script>  <link href="http://dev.virtualearth.net/mapcontrol/v6/mapcruncher/LegendStyle.css" rel="stylesheet" type="text/css"> 

and changed them to what was on the existing samples, referencing version 5:

        <script src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=5" type="text/javascript"></script>           <script src="http://research.microsoft.com/mapcruncher/scripts/v5.5/CrunchControl.js" type="text/javascript"></script>           <link href="http://research.microsoft.com/mapcruncher/scripts/v5.3/LegendStyle.css" rel="stylesheet" type="text/css">

After that, everything worked as expected!

Okay, so a little about this app, it's actually a proof of concept of what can be done with the existing set of tools from Microsoft (released and otherwise) with regards to mapping.

So many people are talking about how the map data is not updated, not enough detail, yadda yadda. Well, it will be good to know that something CAN be done! The great thing about being a developer, you get to make things better than what they currently are. Okay before you go into tears, here's a rundown of what's happening.

If you use VE and view say the area around Microsoft Singapore, you can't go any deeper than this.

image image

* they've improved the experience by the way. It used to be the case that the users can actually zoom into a level deeper than they have data for and you end up with something like:

image

Kudos to the live team for that!

So anyway, what happens with Map Cruncher, is you can basically take an image and map it (pun intended Tongue out) on an area on Virtual Earth, so you end up with something like this:

image

Note this is something I quickly hacked up. I basically took some screen shots from the more detailed, streetdirectory.com and did a quick stitch (not very neatly done if you've noticed) but it proves the point. And depending on the resolution/quality of your source image, you can even do stuff like overlay the floor plan of a building/complex or what have you, with no problem.

The software is pretty straight forward to use, and what it does is once you're done mapping the image onto VE, you click render, and it comes up with a folder which you can just dump on any server and you're good to go. It takes care of creating the tiles for you so you can stream your map down to your clients. I haven't really explored it more but apparently you should be able "expose" this custom map so that other people can then overlay their stuff onto the map you've created. Pretty cool stuff!

If you want to find out more, there are two versions, one is the MS Research version, and there's the commercial Map Cruncher Beta version. For this POC, I made use of the MS Research one. Maybe that explains why it doesn't seem to work with the new version of VE.

Happy Mapping!

Published Wednesday, January 07, 2009 12:12 PM by jocelyn