This project is read-only.

Silverlight Video to Virtual Earth Map Sync

Jul 12, 2007 at 1:12 AM
Edited Jul 12, 2007 at 1:13 AM
I keep getting asked how we did the map syncing to the video in the Contoso Bicycle Club Windows Live Platform Quick Application.

In an Nutshell:

Neil rode around london with a video camera mounted on his bike - he also carried a Garmin GPS.

We took the tracklog from the GPS and uploaded it to the PC using EasyGPS . This gave us a file in GPX format (XML Based).

We then wrote some code that transformed the GPX file into a Expression Media Encoder Project file (also XML format). Each of the track points became a keyframe in the video with a title in the format GPS,<lat>, <lon>. We knew exactly what time the video started, so we could calculate key frame offsets by looking at the time stamp for each GPS position.

We then ran the video through Expression Media Encoder and uploaded it to the Silverlight Streaming Service.

Then, using a Silverlight video player we hooked the onMarkerReached events and, using a simple JavaScript handler, we update the Virtual Earth map whenever a key frame is reached.

The code is pretty simple - take a look at function onMarkerReached in default.aspx.js

Let me know if you use this technique to do something cool in your own app.


Rob Blackwell
R&D Director
Active Web Solutions Ltd

Microsoft MVP, Windows - Virtual Earth/MapPoint

Jul 23, 2007 at 6:07 PM
I have blogged this over at
Aug 10, 2007 at 1:49 AM
I have been coming at this from a different angle - animating movement over a map, with a view to later incorporating photos & video.

(hit Stop and Start to 'animate'; known issues with IE6, use IE7 or FF)

Was planning to time-sync the animation with the video when generating the Animation Xaml, rather than react to onMarkerReached. Given that it's not done yet, I can't claim to be sure it's a workable approach, just an idea.

It would be great if someone was working on a Silverlight 'client' for Live Maps (ala rather than the overlay approach. I'm not sure if the cross-site sandboxing thing would prevent tiles from loading though?

Aug 13, 2007 at 3:21 AM
Really cool stuff you have built.

I've asked Rob Blackwell to jump on the thread as he is a VE guru - far beyond my skills :)
Aug 13, 2007 at 2:55 PM

Great demos - I think the combination of animation / maps / multimedia opens up some interesting possibilities for new apps.

I guess it wouldnt be hard to do some VE stuff from within a Silverlight app - you could pull the map tiles directly and paint them yourself - See for info on the tile serving protocol.

Given all the interest in Silverlight, VE and PopFly, I'd be suprised if Microsoft wasn't already working on some kind of Silverlight VE client as you suggest - that's just speculation though - I guess we'll have to wait and see.

Aug 15, 2007 at 1:57 PM
Thanks Rob - I had seen that Tile Server article previously, and it was very helpful getting 'working'.

Not sure how far it'll go - but I'm thinking I can get it to the point where I can get it to a 'useful' stage in my context. Animation/synchronisation is the key - I could easily trade off zooming and lat/long functions - even a fixed map extent will be fine. The question will then be - is it OK with Microsoft :-s ??? Of course, I'd add the Microsoft Virtual Earth logo...
Aug 16, 2007 at 5:39 AM
Craig - can you ping me offline about this angus dot logan at microsoft