Using ASP.NET Virtual Earth Map control in ASP.NET 3.5

by Euo 16. August 2008 03:45

As I am excited in the new Map control for VS 2008, I immediately created a sample ASP.NET 3.5 application.

How did I do it? well.. 

Fire VS 2008. Select File -> New Website -> ASP.NET Windows Live Web Site

 

 

From the toolbox's Virtual Earth Tab, drag the Map control into page Default.aspx. Run the application. 

 

As easy as that I already have my website embedded with Virtual Earth. 

I then added a simple Shape called Pushpin by adding the code below in the Page Load event of the Default.aspx. 


        var latlong = new LatLongWithAltitude(34.0540, -118.2370);
        var s = new Shape(ShapeType.Pushpin, latlong);
        s.Title = "First hand in ASP.NET Live Controls";
        Map1.AddShape(s);
 

Run the application.

   

Tags:

Development | Virtual Earth | Windows Live

About the author

Something about the author

Month List

Page List