Welcome to MSDN Blogs Sign in | Join | Help

Virtual Earth Silverlight Map Control CTP – Put Scalable Content on the Map

In the previous post I showed how to position Silverlight UIElements at a Location to create pushpins with the Virtual Earth Silverlight Map Control CTP.  You can also position content in a scalable manner using the MapLayer.MapRectangle attached property. For example, the following code will position a scalable video on the Map by specifying the bounding box in LocationRect coordinates – by specifying the Location of the corners of the bounding box. The video is from the MIX’09 conference and it is being mapped to the roof of the Venetian:

<m:Map Mode="Aerial" Center="36.12135,-115.165998" ZoomLevel="17">
    <m:Map.Children>
        <MediaElement Source="http://mschannel9.vo.msecnd.net/o9/mix/09/wmv/key01.wmv" m:MapLayer.MapRectangle="36.122098,-115.167745,36.120414,-115.164390" Opacity="0.75"/>
    </m:Map.Children>
</m:Map>

Here is a screenshot and a link to the running sample:

Virtual Earth Silverlight Map Control CTP - Scalable Video Sample

Virtual Earth Silverlight Map Control CTP – Scalable Video Sample

Notice as you zoom in and out the video will scale with the Map since it was mapped to the bounding box. This can be done with any Silverlight UIElement including images and other user controls. Here are 2 screenshots showing how the video scales with the Map as you zoom in:

Virtual Earth Silverlight Map Control CTP - Scalable Video Sample Virtual Earth Silverlight Map Control CTP - Scalable Video Sample

For more details on using the Virtual Earth Silverlight Map Control, install the Virtual Earth Silverlight Map Control CTP SDK or see the interactive SDK online.

(Note: This post is also available on the Virtual Earth Platform Team Blog)

Published Friday, April 03, 2009 11:35 PM by keithkin

Comments

No Comments
Anonymous comments are disabled
 
Page view tracker