If you a have landed on this page please go ahead and take a gander at the Getting Started Page
http://blog.geoffreyemery.com/post/Virtual-Earth-Server-Side-Control-ndash3b-Getting-Started.aspx
Next we have the setting the properties tutorial to browse
Now lets jump into setting the map control using server side components as well
First lets take a look at the final product.
So we are getting a standarrd map. but we are adding a bunch of server side buttons to interact with map…Namely ZoomIn, ZoomOut, Change the map to Arial,and Road, and Arial With Labels.
So how are hooking into these controls?
On the server just as we normally wood. Lets take a look at the code behind.
protected void Page_Load(object sender, EventArgs e)
{
}
protected void ZoomIn_Click(object sender, EventArgs e)
{
Map1.ZoomIn();
}
protected void ZoomOut_Click(object sender, EventArgs e)
{
Map1.ZoomOut();
}
protected void Aerial_Click(object sender, EventArgs e)
{
Map1.MapStyle = MapStyle.Aerial;
}
protected void Road_Click(object sender, EventArgs e)
{
Map1.MapStyle = MapStyle.Road;
}
protected void Hybrid_Click(object sender, EventArgs e)
{
Map1.MapStyle = MapStyle.Shaded;
}
we also need to add a reference to the VE Class that was added to our bin when we dragged the control onto the web page.
using Microsoft.Live.ServerControls.VE;
And you will see that every time we click the button that the page posts back to the server and modifies the map. This is incredibly inefficient but the purpose was to demonstrate how you can change the map from the server! Sweet Lets take a look at that final product one more time.
![image image_thumb1[4]](http://blog.geoffreyemery.com/image.axd?picture=WindowsLiveWriter/VirtualEarthServerSideControlChangingthe_147B3/image_thumb1%5B4%5D_thumb.png)