Virtual Earth Applications on Windows Azure (Part 2)

Accessing Blob Storage

In this part we want to extend the application and move some of our data into the cloud as well. Let’s start simple and move some blobs into the Windows Azure Blob storage. In this example I use a Microsoft Research (MSR) HD View application that I created with MSR ICE and render it as an iFrame inside the InfoBox of a VEShape-object.


I also have a number of photo- and video-collections using Vertigo’s Slide.Show 2 that I render inside the InfoBox of the VEShape-object as well as a VETileLayer:


We will move the images and videos to the Windows Azure Blob Storage and keep the active content like JavaScript in the web-role project to avoid cross-domain scripting issues.


We will also make the files publicly available to keep it simple. An example for authentication and authorisation will be in the 3rd part in which we look at the table storage.

First open up your Windows Azure Developer Portal and create a new Storage Project:


Note the storage endpoints and your keys. Obviously you can write an application and uploads, downloads or deletes files from the Windows Azure Blob storage but there are also tools available that you can use. In the Windows Azure SDK for example you will find a number of sample applications. One of which is the CloudDrive that allows you to work with the cloud storage through the Windows PowerShell and provides lot’s of command-line functions including a feature similar to xcopy:


Those who prefer the comfort of a graphical user interface will like SpaceBlock which you can download via CodePlex:


So lets create our folders. By right-clicking on the level 1 folder (e.g. hdview) you can open up a context menu that allows you to set the access rights for the container. As mentioned before I’ll give them for now public access. Note: this right is only for reading, not for write-access.


Now that I have my container in the Windows Azure Blob Storage I transfer my local files to the cloud and do the same again for videos, photos and my VETileLayer. SpaceBlock makes it really as simple as working with your local file-system


Once the files are uploaded you can select them in SpaceBlock, right-click on them and have SpaceBlock generate a URL. Lastly you only need to change the URL’s in your application and you’re done. Below is an example for the data file that is used in Sllide.Show 2.

<?xml version="1.0" encoding="utf-8"?>
<data startalbumindex="0" transition="CrossFadeTransition">
  <album title="Wilfreigehege Hellenthal" 
         description="June 2008" 
    <slide title="Wildfreigehege Hellenthal" 
           description="June 2008 - Taken: 10/06/2008" 
           datetaken="10/06/2008" />
album> </data>

Bookmark and Share

Technorati Tags: ,

This entry was posted in Virtual Earth. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s