Welcome to MSDN Blogs Sign in | Join | Help

Bing Maps For Enterprise

Microsoft Virtual Earth is now officially known as “Bing Maps for Enterprise”.  You can see the Bing logo on the Bing Maps website (formerly known as Live Search Maps) and on the Bing Maps Interactive SDK .  You can see the SDKs for the Bing Maps Web Services and the Bing Map Control 6.2. The Virtual Earth Silverlight Map Control CTP will remain “Virtual Earth” for now since it is a CTP, but will be part of the Bing Maps platform when the next release is available.

For more details on the change from Virtual Earth to Bing Maps, check out this blog post from Chris Pendleton on Bing Maps which has a nice video discussing the new name and check out Bing!.

bing

Bing Maps Interactive SDK 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Bing Maps Interactive SDK

 

bingmaps 

Bing Maps

(Note: This post is also available on the Bing Maps for Enterprise Team Blog)

TechEd Sessions on Virtual Earth Silverlight Map Control Available Online

The session I gave at TechEd 2009 is now available for online viewing for TechEd attendees. Click on the link below to view the session if you missed it or if you want to watch it again:

WUX402: Deep Dive on Virtual Earth Silverlight Map Control

The Microsoft Virtual Earth Platform has grown immensely over the past year from our Virtual Earth AJAX Map Control to our new Virtual Earth Web Services and now our Virtual Earth Silverlight Map Control which is now available as a public beta to developers. Come and join us as we take you on a tour of all the features and dig deep into the code to show you how to build your own Virtual Earth applications in Silverlight.

 WUX402: Deep Dive on Virtual Earth Silverlight Map Control

Download source code for this session.

Also, I did a 20 minute interview with Mark Dunn for TechEd Online to discuss some of the features of the Virtual Earth Silverlight Map Control. This video is available to everyone. You can see the video here:

TTK20: Microsoft Virtual Earth Silverlight Map Control

The Microsoft Virtual Earth Platform has grown immensely over the past year from our Virtual Earth AJAX Map Control to our new Virtual Earth Web Services and now our Virtual Earth Silverlight Map Control which is now available as a public beta to developers. Watch as Keith Kinnan and Mark Dunn talk about some of the features of the Virtual Earth Silverlight Map Control.

TTK20: Microsoft Virtual Earth Silverlight Map Control

Thanks to everyone who attended TechEd. I enjoyed meeting with you at the sessions and at the Silverlight booth.  Don’t forget to download the Virtual Earth Silverlight Map Control CTP, try it out, and  give us feedback!

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

TechEd 2009 – Deep Dive on Virtual Earth Silverlight Map Control Session – Links and Demo Source Code

Thanks to all who attended my session at TechEd 2009 today – WUX402: Deep Dive on Virtual Earth Silverlight Map Control.   I had a great time and I hope you enjoyed it! I wanted to post the source code to the samples I demoed and provide some relevant links.

You can download the Microsoft Virtual Earth Silverlight Map Control CTP at the Connect Portal.

Here are links to some of the demos using the Virtual Earth Silverlight Map Control that I showed at the beginning of the session:

Here are links to the source code for all the code samples I showed:

Here are some notes about the code samples:

  • The solution files are for Silverlight 3 Beta, however the code for everything except the Map Rotation sample should work within a Silverlight 2 solution.
  • You will need to download and install the Silverlight Map Control CTP and make sure the MapControl project references are pointing to Microsoft.VirtualEarth.MapControl.dll on your machine to build these samples
  • The samples using the Virtual Earth Web Services require Virtual Earth credentials. You will need to edit the Credentials.cs file in those projects to provide credentials. You can sign up for an evaluation account to try out the web services. See the following articles for more details. I have also added comments in the Credentials.cs files with links to these articles.
  • The samples using Virtual Earth Silverlight Map Control without Virtual Earth Web Services do not require credentials.

Have fun!

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

Learn about Virtual Earth at TechEd this Week!

Just a reminder that I’ll be out at TechEd this week in LA. Come see the Virtual Earth session on Wednesday at 4:30 PM to learn how to build applications with the Virtual Earth Silverlight Map Control:

WUX402 Deep Dive on Virtual Earth Silverlight Map Control

Wed 5/13 | 4:30 PM-5:45 PM | Room 408B

The Microsoft Virtual Earth Platform has grown immensely over the past year from our Virtual Earth AJAX Map Control to our new Virtual Earth Web Services and now our Virtual Earth Silverlight Map Control which is now available as a public beta to developers. Come and join us as we take you on a tour of all the features and dig deep into the code to show you how to build your own Virtual Earth applications in Silverlight.

Also, I’ll be hanging out at the Silverlight booth Tuesday and Thursday morning this week. So stop by if you want to talk more about Virtual Earth. Hope to see you there!

Virtual Earth Silverlight Map Control CTP – Crazy Spinning Map with Silverlight 3 Beta

The Virtual Earth Silverlight Map Control CTP is designed to work with Silverlight 2.  However, since Silverlight 3 is reverse-compatible with Silverlight 2, you can use it with Silverlight 3 Beta projects also.

At MIX09, Joe Stegman demonstrated a nice Perspective 3D demo where he rotated a DataGrid in the X, Y, and Z directions using the new PlaneProjection offered in Silverlight 3.  I thought it would be fun to check it out and see how it works with the Virtual Earth Silverlight Map Control CTP.  Check out the results! If you don’t have Silverlight 3 installed, you will see a page where you can install Silverlight 3 Beta.

Here is a link to the running application and some screenshots:

Virtual Earth Silverlight Map Control CTP / Silverlight 3 Crazy Spinning Map Sample

Virtual Earth Silverlight Map Control CTP / Silverlight 3 Crazy Spinning Map Sample Virtual Earth Silverlight Map Control CTP / Silverlight 3 Crazy Spinning Map Sample Virtual Earth Silverlight Map Control CTP / Silverlight 3 Crazy Spinning Map Sample Virtual Earth Silverlight Map Control CTP / Silverlight 3 Crazy Spinning Map Sample

I made a couple of modifications to Joe Stegman’s original demo. I replaced the DataGrid with a Map and made it take up space of the whole Grid. I also updated the controls to have a Play “>” and Pause “||” button to start animations.

spinningcontrols

Click and Slide the Rotation X slider to manually control the rotation along the X axis. 

Click and Slide the Rotation Y slider to manually control the rotation along the Y axis. 

Click and Slide the Rotation Z slider to manually control the rotation along the X axis. 

Click and slide the Zoom Level slider to manually control the zoom level. You can also manually use keyboard and mouse input and the navigation control on the Map to control its view.

Click on the Play “>” button by each slider to kick off a repeated animation for that axis. Click on the “>” button for each axis to create a crazy rotation animation. Click on Pause “||” button to stop the animation for each axis.  You can also click the “Reset” button at any time to reset the Map back to its original state. With different combinations you can create some crazy effects with zooming spinning maps! 

I thought this was an interesting display of some of the amazing capabilities of Silverlight 3 Beta with the Virtual Earth Silverlight Map Control. Have fun!

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

Virtual Earth at Tech-Ed North America 2009

Come learn about Virtual Earth and the Virtual Earth Silverlight Map Control at Microsoft  Tech-Ed North America 2009, May 11-15 in Los Angeles. I will be presenting a session on Virtual Earth and and the details are below. I hope to see you there!

WUX402 Deep Dive on Virtual Earth Silverlight Map Control

The Microsoft Virtual Earth Platform has grown immensely over the past year from our Virtual Earth AJAX Map Control to our new Virtual Earth Web Services and now our Virtual Earth Silverlight Map Control which is now available as a public beta to developers. Come and join us as we take you on a tour of all the features and dig deep into the code to show you how to build your own Virtual Earth applications in Silverlight.

teched2009

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)

Virtual Earth Silverlight Map Control CTP – How to Create Simple Pushpins

The Virtual Earth Silverlight Map Control CTP supports several different ways to position content on the map.  Some of these ways are to:

  • Position a fixed-size element at a Location on the Map, which will act like a pushpin. 
  • Position an element in a scalable manner on the Map by mapping it to a Location Rectangle bounding area on the Map so it will scale with the Earth surface as you zoom in and out. 
  • Position an element at a fixed screen pixel coordinate over the Map such that it exists over the Map.

There currently is not a pushpin class built into the Virtual Earth Silverlight Map Control. The reason is Silverlight already has a UIElement class which is a basic UI primitive.  So, the Silverlight Map control provides the capability to position UIElements in the Latitude/Longitude space.  To create a pushpin, you can put any UIElement on the Map and use the MapLayer.MapPosition attached property to position it at a Latitude and Longitude.

The Map has a Children property where you can insert child elements on the Map. In the sample code below, an Image is inserted as a child of the Map.  The MapLayer.MapPosition attached property sets the Latitude and Longitude of the element over the Statue of Liberty. Since the pushpin image we are using in this sample has its anchor point on the bottom left, we can use the MapLayer.MapPositionMethod attached property to anchor the bottom left part of the UIElement to the Location.  Note: You can also specify other anchor positions such as TopLeft, Center, etc. For example, if you want the center of the image to point to the Latitude/Longitude specified, then use “Center”.  There is also a MapLayer.MapPositionOffset attached property you can use to specify an exact offset in pixels to anchor a point on your UIElement to the Latitude/Longitude more precisely if you need to do so.

For example, here’s XAML code to put the simple pushpin image on the Map and make the bottom left part of the image point to the Location:

        <m:Map Mode="Road" Center="40.689205,-74.044526" ZoomLevel="17">
            <m:Map.Children>
                <Image Source="http://krkinnan.members.winisp.net/i/pin1.png" m:MapLayer.MapPosition="40.689205,-74.044526" m:MapLayer.MapPositionMethod="BottomLeft" Width="35" Height="35"/>
            </m:Map.Children>
        </m:Map>

Simple Pushpin Sample  pushpinsample2
Virtual Earth Silverlight Map Control CTP – Simple Pushpin Sample

You can also add the pushpin to the Map using C# in the code behind file – for example:

            //Create the pushpin image UIElement
            Image image = new Image();
            image.Source = new BitmapImage(new Uri("
http://krkinnan.members.winisp.net/i/pin1.png", UriKind.Absolute));
            image.Width = 35;
            image.Height = 35;

            //Add the pushpin to the Map
            MyMap.Children.Add(image);

            //Position the pushpin using the attached properties
            MapLayer.SetMapPosition(image, new Location(40.689205, -74.044526));
            MapLayer.SetMapPositionMethod(image, PositionMethod.BottomLeft);

Notice in this sample, the pushpin image will stay fixed width and height as you zoom in and out and stay at the Latitude/Longitude specified as you move the Map.  You can position any Silverlight UIElement the same way using the MapLayer.MapPosition property.  So, your pushpins don’t have to be images - they can be complex Silverlight objects.  You can also attach Silverlight events to your UIElement to create advanced effects.

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

In a future post I will show you how to position elements in a scalable manner so they scale as the Map zooms in and out.

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

Virtual Earth Silverlight Map Control CTP: Setting the Map Mode and View

In a previous post, I showed you how to get started and create the simple “Hello World” sample using the Virtual Earth Silverlight Map Control CTP.  Notice in that sample, the map by default shows the “Road” map.  The navigation control at the top left of the map lets users manually change the Map to other map styles by clicking on Aerial and toggling Labels.  Also, by default, the user can navigate the map to change the map view with input devices by using the mouse wheel and clicking and dragging the map. 

The Virtual Earth Silverlight Map Control also allows you to programmatically control the map mode and the map view which allows you to put the Map in a known state when it initializes.  In the Virtual Earth Ajax JavaScript Map Control, map modes were referred to as “map styles”.  To set the initial map mode, you can use the Mode property of the Map.  There are 3 supported Map Modes in the CTP: Road, Aerial, and AerialWithLabels

Here’s example XAML code to set the Map Mode to Aerial:

<m:Map Mode=”Aerial” />

Here’s example XAML code to set the Map Mode to Aerial with labels turned on (known as Hybrid map style in the Ajax map control):

<m:Map Mode=”AerialWithLabels” />

Here’s example XAML code to set the Map Mode to Road:

<m:Map Mode=”Road” />

Also, the Mode XAML property uses a type converter so you can set it with a string in the XAML. If you want to set the MapMode in the code behind file, you can do this by setting the Mode property to an instance of the MapMode class. For example:

map.Mode = new RoadMode(); // Set the Mode to “Road”

map.Mode = new AerialMode(); // Set the Mode to “Aerial”

map.Mode = new AerialWithLabelsMode(); //Set the Mode to “AerialWithLabels”

In addition to setting the Map Mode, you can also set the Center and ZoomLevel properties on the Map to control the initial Map view. The Center property is of type Location which lets you specify the Latitude and Longitude of the Map center point.  The ZoomLevel is a double and lets you specify the level of detail of the Map View.  Notice in the Javascript Ajax Map Control the zoom level was an integer, however in Silverlight it is a double, so you can have in-between floating point zoom levels.

For example, the following XAML will initially put the Map in Aerial Mode with labels and set the center and zoom level over San Francisco:

<m:Map Mode=”AerialWithLabels” Center=”37.806029, –122.407007” ZoomLevel=”16” />

Here’s the sample running:

Virtual Earth Silverlight Map Control CTP Sample

Virtual Earth Silverlight Map Control CTP: Set Initial View Sample

Here’s the complete listing of the XAML code from the sample:

<UserControl x:Class="SilverlightApplication1.Page"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:m="clr-namespace:Microsoft.VirtualEarth.MapControl;assembly=Microsoft.VirtualEarth.MapControl">
    <Grid x:Name="LayoutRoot" Background="White">
        <m:Map Mode="AerialWithLabels" Center="37.806029, -122.407007" ZoomLevel="16"/>
    </Grid>
</UserControl>

You can also programmatically set the Center and ZoomLevel in the code behind file. For example:

map.Center = new Location(37.806029, –122.407007);

map.ZoomLevel = 16;

There are also some additional SetView methods which allow you to set the view without using the properties directly.  For more information, see the Virtual Earth Silverlight Map Control CTP Interactive SDK.

(Note: this post is also available at the Virtual Earth Platform Team Blog)

Virtual Earth Silverlight Map Control CTP – Building a “Hello World!” Sample From Scratch

I wanted to start with a simple “Hello World!” sample to show you how to create your first application with the Virtual Earth Silverlight Map Control CTP.   With just a few easy steps, you can get started building applications with the Virtual Earth Silverlight Map Control and get the rich interactive experience of Silverlight.  Here are the steps to download the Virtual Earth Silverlight Map Control CTP and build your first application.

Download the Virtual Earth Silverlight Map Control CTP SDK from the Microsoft Connect Portal. If you have not registered with Microsoft Connect, you will be prompted to register with a Windows Live ID.  Once you sign in, if this is your first visit to the Virtual Earth Silverlight Map Control CTP page, you will be asked a small set of survey questions to enroll in the CTP program.  Once you are enrolled, you can click on the Downloads link on the left to download the SDK installer. Once you download the installer and run it, the Microsoft Virtual Earth Silverlight Map Control CTP SDK will be installed on your system.  This includes the map control assembly and the SDK help file.

Microsoft Connect Portal  Download Microsoft Virtual Earth Silverlight Map Control CTP      Install Microsoft Virtual Earth Silverlight Map Control CTP

Now you are ready to create your first project.  Make sure you have Visual Studio 2008 SP1 installed along with the Silverlight Tools for Visual Studio 2008 SP1.  In Visual Studio, create a new Silverlight project by selecting File->New->Project

VS2008 - New Project

In the New Project window, select Silverlight Application and click OK

   VS2008 - New Silverlight Application

You will then be prompted to create a new web site in the project. Select “Add a new ASP.NET web project to the solution to host Silverlight” and click OK. This will allow you host and test your Virtual Earth application locally using HTTP since the Virtual Earth application makes HTTP requests to different domains to request tiles and web services. 

VS2008 - Create New Website

Now that your project is created, you need to add a reference to the Virtual Earth Silverlight Map control assembly. To do this, right-click on References in the solution and select Add Reference and then browse for and select the Silverlight map control assembly that was installed with the SDK and click OK.  The default installation path for the assembly is Program Files\Microsoft Virtual Earth Silverlight Map Control\CTP\Libraries\Microsoft.VirtualEarth.MapControl.dll.

 Add Reference Select Map Control Assembly  Reference Added

Now, you just need to add a Map object to your Page.xaml file in your solution.  Double click on the Page.xaml file in the solution and add the following 2 lines.

Add the MapControl namespace property to the UserControl element:

    xmlns:m="clr-namespace:Microsoft.VirtualEarth.MapControl;assembly=Microsoft.VirtualEarth.MapControl"

Then, add a Map object in the Grid of your User Control

        <m:Map />

Here is the complete listing of the Page.xaml code with the 2 lines added highlighted in bold:

<UserControl x:Class="SilverlightApplication1.Page"
    xmlns="
http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:m="clr-namespace:Microsoft.VirtualEarth.MapControl;assembly=Microsoft.VirtualEarth.MapControl" >
    <Grid x:Name="LayoutRoot" Background="White">
       
<m:Map />
    </Grid>
</UserControl>

Press CTRL-F5 to build your application and see your first Virtual Earth Silverlight Map Control application running locally:

Virtual Earth Silverlight Map Control - Hello World!

You can see this sample running here: 

Virtual Earth Silverlight Map Control CTP Hello World Sample

So with 2 small lines of XAML, you are able to get the Virtual Earth Silverlight map up and running and get the rich interactive deep zoom experience of Silverlight!

(Note: this post is also available at the Virtual Earth Platform Team Blog)

Virtual Earth at MIX09 – Day 3

Thanks everyone who came to the session and to those who stopped by and visited with us at MIX throughout the week! We enjoyed launching the Virtual Earth Silverlight Map Control CTP and meeting with you.  Here are some pictures from Day 3:

Max, Keith, and Train at MIX09  3rd Place UnSessions Area at MIX09 3rd Place at MIX09 Virtual Earth at 3rd Place at MIX09 Chris Pendleton gives his session talk Virtual Earth Silverlight Map Control CTP demo at session

The Introducing the Microsoft Virtual Earth Silverlight Map Control session video is now available on the MIX09 site.

The CTP bits also went live at the Microsoft Connect Portal yesterday, so you can download the SDK and build some cool apps! We look forward to seeing what you can do with it! 

Introducing the Microsoft Virtual Earth Silverlight Map Control Session Video

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

Virtual Earth Silverlight Map Control CTP Demo at MIX09!

Chris Pendleton recorded a video with me, Train Chiou, and Max Artemov at MIX09 yesterday as we demoed the new Virtual Earth Silverlight Map Control CTP at 3rd Place.  Check out the video:

"MIX: Day 2 – The Guys Who Make Virtual Earth Light Up Silver" Video

There will be a session on the Virtual Earth Silverlight Map Control diving deeper into the control capabilities today at 12:30 PM with Chris Pendleton in Lando 4201.  See you there!

Virtual Earth at MIX09 – Day 2

We had a fun time at MIX09 On Day 2! Thanks to everyone who stopped by at 3rd Place. It was fun talking with you and demoing the Virtual Earth Silverlight Map Control CTP. 

Train and Max at MIX09 Virtual Earth whiteboard at 3rdPlace area at MIX09

Don’t forget to come to the Virtual Earth Session today at 12:30 PM in Lando 4201 to come learn more about the Virtual Earth Silverlight Map Control CTP! We look forward to seeing you there!

Learn about the Virtual Earth Silverlight Map Control CTP at MIX09

We announced the Virtual Earth Silverlight Map Control CTP this morning at the MIX09 keynote. We also just announced that the Virtual Earth Silverlight Map Control CTP Interactive SDK is available online, and the bits will be available for download on Friday 

If you want to learn more about the Virtual Earth Silverlight Map Control CTP, come see the Virtual Earth session on Friday given by Chris Pendleton.  Also, Train Chiou, Max Artemov and I will be around to answer any questions.  We will be at Chris’s session as well as attending other MIX09 sessions and hanging out at 3rd Place sometimes. So don’t be shy to come chat with us.  We’ll also be at Tao tonight. See you there!

Train, Max, and Keith at MIX09Train, Max, and Keith at MIX09

Virtual Earth Silverlight Map Control CTP Interactive SDK Available

The Virtual Earth Silverlight Map Control CTP was announced at this morning’s keynote.  You can now access the Virtual Earth Silverlight Map Control CTP Interactive SDK at the Microsoft Connect site! Here is a screenshot of the Interactive SDK:

Virtual Earth Silverlight Map Control Interactive SDK

If you are not yet part of the Virtual Earth Silverlight Map Control CTP program yet or have not registered with Connect, you will be presented with a page with instructions on how to sign up.  Once you sign up you will have access to the interactive SDK which shows a how to use the Virtual Earth Silverlight Map Control CTP with some code samples.  The actual Virtual Earth Silverlight Map Control CTP bits will available for download to the public this Friday, March 21st at 12PM Pacific Time. Please return to the site at that time to download the installer.

More Posts Next page »
 
Page view tracker