Click here to Skip to main content
15,570,042 members
Articles / Web Development / HTML
Posted 31 Mar 2007


26 bookmarked

A Virtual Earth slide show Gadget for Windows Vista

Rate me:
Please Sign up or sign in to vote.
4.20/5 (13 votes)
11 Apr 2007CPOL6 min read
Mobilis Immobile is a Virtual Earth slide show Gadget for Windows Vista


"Mobilis Immobile" is a Virtual Earth slide show Gadget for Windows Vista. So with "Mobilis Immobile" ("Mobim" for short), you can travel all over the world to your favorite places without moving from the front of your screen! By the way, "travel without moving" is exactly what "Mobilis Immobile" sentence means in Latin.

Installing and using the Gadget

To install the Mobim Gadget just drag it from the gadget gallery on the sidebar or on the desktop.

Docked or undocked

Mobim can be displayed in three different views:

  • Docked: The docked view is when the gadget is in the sidebar.
  • Undocked: The undocked view is when the gadget is on the desktop. The view is larger than the docked view and allow you to view the full description of the current slide.
  • Flyout: The flyout view combines docked and undocked. With this view you have both the docked and undocked view side by side. The flyout view appears when you click on the docked view.

Here is a screen capture of each view:

Screenshot - mobim1.jpgScreenshot - mobim2.jpg
Docked viewUndocked view
Flyout view
Flyout view


Mobim gadget has an enhanced settings windows. See below:

Screenshot - mobim4.jpg

Here is what each option means:

  • URL: URL is the web address of the feed or collection currently displayed.
  • Paste: The Paste button just pastes the content of the Windows clipboard in the URL field.
  • Display during: Choose the elapsed time between each slide.
  • Default view: Default map style (aerial, road, hybrid or bird's eye) used when no value is set in the slide description.
  • Default zoom: Default zoom used when no value is set in the slide description.
  • Shuffle: Shuffle slides when checked or displays in the order of the feed or collection when unchecked.
  • Display marker: Display a pushpin for each item when checked.
  • Display description: Displays title of each slide (or both title and description on larger view) when checked.

Choose your feed

Mobim gadget can display two types of slides:

  • Live Collection: Live collections could be created using Microsoft's Live web site or could be chosen on To display a collection, either for personal collections of for shared collections, just paste the full address of the collection in the URL field of the settings window. URL address must be something like "" or "".

Screenshot - mobim5.jpg

  • GeoRSS feed: GeoRSS is an extension of the standard XML RSS format. In fact, GeoRSS just adds two XML elements to a standard RSS item: <geo:lat> and <geo:long>. Of course, <geo:lat> is used for the latitudinal coordinate and <geo:long> is used for the longitudinal coordinate. See below an example of a GeoRSS feed. To use GeoRSS in Mobim, just paste the address or the web site where your GeoRSS feed is hosted. It could be a local or a distant web site, or it could be a link to a static XML or a dynamically generated XML.
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:geo=""
xmlns:georss="" xmlns:gml=
<link />
<description>Famous place in Perpignan, France</description>
 <description>[mode@o][zoom@1][sceneid@10995771]Castillet Castle built
   in 1368.</description>
 <title>Dames de France</title>

Playing slide show

The slide show begins as soon as you drag Mobim on the sidebar/desktop or as soon as you exit from the settings windows, committing your choice.

A control bar allows you to control the slide show more precisely. The control bar appears automatically when you move the mouse cursor over the gadget. Using the pause button, you can suspend/resume the slide show; using the next or previous button you can move to the next or previous slide.

Screenshot - mobim6.jpg

Note that the control bar is also usable in the flyout view. In this case, the control bar of the smaller view controls both the smaller and the larger views.

Customize view

Mobim allows you to customize the slide show using general settings or using a setting for each slide. To do that, you need to encode settings in the description field of your collection or your feed with a special pattern.

Three parameters could be used:

  • [mode@X] : Set the view for this slide. Allowed values for X are: a for aerial, r for road, h for hybrid and o for bird's eye.
  • [zoom@N] : Set the zoom level for this slide. Allowed values are 1 to 19.
  • [sceneid@X] : Set the sceneID for the slide. This value is used internally by Virtual Earth to identify the photography of the scene. This value makes sense only in bird's eye view.

Screenshot - mobim7.jpg

Note that parameter values do not appear in the description field in the detailed view.

How it works

Of course, Mobim relies on features of Virtual Earth. Virtual Earth can load and use as pushpins, a GeoRSS, or a live collection. Unfortunately, Virtual Earth handles all items as a layer and you can't control the way the layer is displayed the first time. Moreover, you don't have access to the full characteristics of items. So for Mobim, I rewrote the loading of GeoRSS feed and live collection from scratch. Here how:

Load slides

The heart of Mobim is to build a collection where each item is a slide and its characteristics. This process is done at startup with an AJAX call in the function named loadItems. Find below an excerpt of this function:
function loadItems(callback) 
    collection = new Array();
    afterLoad = callback;
    httpreq = new ActiveXObject("Microsoft.XMLHTTP");"GET", urltocall, true);
    httpreq.onreadystatechange = processRequest;

When the request is done, Mobim must process the response to fill the collection array. The process depends on the type of collection: GeoRSS or Live Collection. Which is exactly what the function processRequest does. See here:

function processRequest() 
    // only if req shows "loaded"
    if (httpreq.readyState == 4) 
        // only if "OK"
        if (httpreq.status == 200) 
            if (islive)

            if (collection.length > 0) 
                if (shuffle)
                System.Debug.outputString("no feed available\n"); 
            System.Debug.outputString("error reading feed\n");

Today, to find if a URL is a Live collection or a GeoRSS feed we just have to do a test on the prefix of the URL (Live Collections start by "" or "".

Process a GeoRSS feed

Processing GeoRSS is pretty simple, it's just an XML text and Mobim parse it node by node.

function processGeoRSS() 
    var items = httpreq.responseXML.getElementsByTagName("item");
    var title_string;
    var description_string;
    var link_string;
    var point;

    for (var i = 0; i < items.length; i++) 
        title_string = getElementText("title", items[i]);
        description_string = getElementText("description", items[i]);
        link_string = getElementText("link", items[i]);
        point = findPoint(items[i]);
        if (point != null)
            collection.push(new MobimRSSItem(title_string, 
                description_string, link_string, point));

Process Live collections

Bad news: there is no API today to get a Live Collection. So I need to use a hack to find how to retrieve and parse it. Using IE HTTP Analyzer, I found that to retrieve a Live Collection layer, Virtual Earth internally uses this HTTP call:
Where XXXX is the collection ID in the initial URL and where 1111111111111 and 2222222222222 are contextual numbers whi are irrelevant here. In response to this call, the Live Server return a JSON response like this:
     new VE_Annotation('D4783333CD255A28!116','Statue of Liberty, New York, 
          USA','','','01/01/0001 00:00:00',
          'Located on a 12 acre island, the Statue of Liberty ...[zoom@16]',
          '01/01/0001 00:00:00',[]),
     new VE_Annotation('D4783333CD255A28!117','Key West, Florida, USA',
          '01/01/0001 00:00:00','Key West is a city and an island...',
          '01/01/0001 00:00:00',[]),

Each item of the embedded array is exactly what I need: characteristics of all items in the Live Collection. After a few substitutions and a call to eval, it's now easy to retrieve an array:

function processLiveCollection() 
    var response = httpreq.responseText; 

    // Compute start
    var start = response.indexOf("([new VE_Annotation(");
    if (start == -1) 

    // Compute end
    var end = response.indexOf(")],'2222222222222');", start);
    if (end == -1)

    // Extract from start to end
    var strarray = response.substring(start+1, end+2);
    strarray = strarray.replace(/VE_Annotation/g, "MobimLiveMarker");
    // Eval collection
    collection = eval(strarray);

Create your own slide show

Feel free to create your own Live collection or GeoRSS feed and view it with Mobim. A good start to find nice places all over the world is the Bird's Eye Tourist web site. Also do a follow up to the Virtual Earth blog Team where a lot of Virtual Earth tips and tricks are listed. Here some of my favorites collections (drag & drop URL in URL field and use recommended settings):

Do not hesitate to contact me for bugs, questions, or comments.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
Architect C2S
France France
Lionel is a software architect at C2S, a software company based in France and subsidiary of the Bouygues group.
Lionel is also the author of Liogo, an open-source Logo compiler for .NET.
Lionel is a contributor of DotNetGuru and Dr.Dobb's Journal.
Lionel is President and co-founder of OLPC France.

Comments and Discussions

Generalnot working Pin
yoyo_houda19-Jun-09 5:55
yoyo_houda19-Jun-09 5:55 
GeneralRe: not working Pin
Lionel LASKE21-Jul-09 22:02
Lionel LASKE21-Jul-09 22:02 
QuestionHow can I use the gadget with reconnaissance system? Pin
kimberlyly30-Nov-08 22:51
kimberlyly30-Nov-08 22:51 
GeneralI can't get this work!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Pin
jomomo27-Oct-08 14:52
jomomo27-Oct-08 14:52 
GeneralRe: I can't get this work!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Pin
Lionel LASKE27-Oct-08 22:21
Lionel LASKE27-Oct-08 22:21 
QuestionReload the RSS feed? Pin
Kari Ruuskanen2-Jul-08 22:24
Kari Ruuskanen2-Jul-08 22:24 
AnswerRe: Reload the RSS feed? Pin
Lionel LASKE3-Jul-08 11:58
Lionel LASKE3-Jul-08 11:58 
GeneralI can't figure it out. Pin
Dimeyard29-Nov-07 0:10
Dimeyard29-Nov-07 0:10 
GeneralRe: I can't figure it out. Pin
Lionel LASKE29-Nov-07 0:16
Lionel LASKE29-Nov-07 0:16 
GeneralRe: I can't figure it out. Pin
Dimeyard29-Nov-07 0:34
Dimeyard29-Nov-07 0:34 
GeneralNice Pin
Alaa Jubran16-Jul-07 8:50
Alaa Jubran16-Jul-07 8:50 
QuestionHow can I install this gadget? Pin
laatr2-Apr-07 5:47
laatr2-Apr-07 5:47 
AnswerRe: How can I install this gadget? Pin
Lionel LASKE2-Apr-07 5:57
Lionel LASKE2-Apr-07 5:57 
GeneralRe: How can I install this gadget? Pin
laatr2-Apr-07 6:02
laatr2-Apr-07 6:02 
GeneralAwesome Gadgets Pin
csrveer31-Mar-07 11:24
csrveer31-Mar-07 11:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.