Geoffrey Emery
Tech Goodness

Virtual Earth Server Side Control – Setting Map Properties

February 24, 2009 02:20 by gemery

image_thumb2If 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

So now that you have the got the control installed on your computer and you have installed the ctp you can then go ahead and get started.

Starting It up so go ahead and drag over the server control over to the page

Drag and drop control onto your web page - You can drag and drop the control from toolbox onto your web page and set some properties and you are ready to go.

clip_image002

Now we are going to go ahead and set some properties.  First we should have a look at the parameters created when dragging the control from the Toolbox and dropping it on a Web page. The default values in the description are also those created when dragging the control from the Toolbox and dropping it on a Web page.

ID

Required. The unique identifier for the control on the Web page. The default value is Map1.

Height

Optional. The height of the control on the Web page. The default value is 400px.

Width

Optional. The width of the control on the Web page. The default value is 400px.

ZoomLevel

Optional. The zoom level of the map on the Web page. The default value is 4.

Altitude

Optional. The altitude, in meters.

Center-Latitude

Optional. The latitude, in degrees, of the center of the map. The allowed range is from -90 (south pole) to 90 (north pole). The default value is 40.

Center-Longitude

Optional. The longitude, in degrees, of the center of the map. The allowed range is from -180 to 180. The default value is -104.

ClearInfoBoxStyles

Optional. Whether to clear any style settings for the information boxes. If true, the styles are cleared. The default value is false.

ClientToken

Optional. The unique client token from the Virtual Earth Platform service. Used to enable paid features and also track usage the token is received server side from the Virtual Earth Platform Web service. The default value is empty (""). Client tokens are required to get traffic information.

DashBoard

Optional. Whether to display the dashboard. If true, the dashboard is shown. The default value is true.

DashBoardSize

Optional. The size of the dashboard, if displayed. The allowed values are Tiny, Small, and Normal. The default value is Normal.

DisambiguationDialog

Optional. Whether to show the default disambiguation dialog is displayed when multiple results are returned from a location query. If true, the disambiguation dialog is displayed. The default value is true.

EnableShapeDisplayThreshold

Optional. Whether shapes are drawn below a threshold zoom level. If true, shapes are drawn below the threshold level. The default value is false.

Of going this for real first lets start off with blank ajax web site…

<%@ Page Language="VB"  AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager runat="server" ID="script1" />
    <div>
    </div>
    </form>
</body>
</html>

 

Now we are going to add the mapping control. Simply drag it across.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@ Register Assembly="Microsoft.Live.ServerControls.VE" Namespace="Microsoft.Live.ServerControls.VE"
    TagPrefix="ve" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Setting Map Porperties with the Virtual Earth Server Side Control</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager runat="server" ID="SM1" />
    <div>
        <ve:Map ID="Map1" runat="server" Height="400px" Width="400px" ZoomLevel="4" />
    </div>
    </form>
</body>
</html>

 

You will notice that you have a user control registered at the top and that the ve map control, and also notice that there is now a new dll in the bin folder that is inserted from dragging on the control.

image_thumb

Now you are ready go press f5 and lets see what you get…

image_thumb21

A ma centered on the US.  Awesome So lets set some properties.

Since mix is right around the corner lets set the map on the The belagio hotel.

change the map style to aerial , turn on the minmap and make the default measurement into kilometers not to mention play with the zoom level a bit.

 

<ve:Map ID="Map1" runat="server" Center-Latitude="36.11285" 
        Center-Longitude="-115.174" Height="600px" MapStyle="Aerial" MiniMap="True" 
        MiniMapSize="Large" MiniMapXoffset="520" MiniMapYoffset="5" 
        ScaleBarDistanceUnit="Kilometers" Width="720px" ZoomLevel="18" />

 

Now lets take a look at what we get.

image_thumb4

And that's its now we have set up our first virtual earth server side control.


Related posts

Comments

July 17. 2009 05:34

SEO

The ASP.NET MVC Framework is a Model-view-controller pattern which Microsoft added to ASP.NET. It allows software developers to build a Web application as a composition of three roles: Model, View and Controller.

SEO

July 28. 2009 23:14

online poker

Hi,

Good post....Using the Virtual Earth map in your web page is nothing new. What is new about this control is that you can drop it into your ASP.NET project in Visual Studio and get it running without the need for any client side JavaScript. All of the parameters can be set in Visual Studio and all of the code to manipulate and interact with the map and map data and can be written in server side .net code.

online poker

August 21. 2009 23:07

guía del casino en línea de confianza

I found your site on delicious today and really liked it.. i bookmarked it and will be back to check it out some more later ..

guía del casino en línea de confianza

August 23. 2009 02:46

London Escorts

ASP.NET developers can now integrate Microsoft Virtual Earth Maps simply by dragging and dropping an ASP.NET Server Control in Visual Studio and Visual Web Developer. No JavaScript programming is required. This control can be combined with ASP.NET AJAX capabilities to provide ASP.NET Serverside processing without the need of coding in JavaScript.

London Escorts

August 31. 2009 00:28

Web Design London

Can u compare jsp and asp.net over security issues, fastness, cost effective? Which is best to avoid hacking?

Web Design London

August 31. 2009 22:15

Social network marketing

Hi,
Excellent post.I want to thank you for this informative read, I really appreciate sharing this great post. Keep up your work…

Social network marketing

September 8. 2009 03:59

hp laptops

Can u compare jsp and asp.net over security issues, fastness, cost effective? Which is best to avoid hacking?

hp laptops

September 14. 2009 02:15

Web design


Wow....i'm realy apreciate your posting it's realy informated for me hope you always update more often and share to us what you know. Thanks

Web design

September 26. 2009 02:34

wine club

Nice post to hang on..I really loved it the way of the stuff provided in this article..This has given very useful information..

wine club

October 1. 2009 23:52

free diet plans

I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post

free diet plans

October 3. 2009 22:34

best teeth whitening products

Very interesting site..Useful information shared..Iam very happy to read this article..thanks for giving us nice info..Keep up the work..

best teeth whitening products

October 4. 2009 00:52

anti aging products

I am very glad to see such information which I was searching for a long time.This made very glad..This site has given us an useful information..

anti aging products

October 5. 2009 03:47

green tea for weight loss

Useful information shared..Iam very happy to read this article..thanks for giving us nice info.Fantastic walk-through. I appreciate this post.

green tea for weight loss

October 5. 2009 23:17

XRF

Hi,
If you aren't familiar with Web.Maps.VE, it is the industries first ASP.NET Virtual Earth Mapping Server Control. It enables you (the developer) to implement MS Virtual Earth mapping into your ASP.NET web applications by writing only server-side code; there is absolutely no javascript required. It has never been easier to implement MS Virtual Earth mapping.

XRF

October 6. 2009 04:35

Free games online

Now we are going to go ahead and set some properties. First we should have a look at the parameters created when dragging the control from the Toolbox and dropping it on a Web page. The default values in the description are also those created when dragging the control from the Toolbox and dropping it on a Web page.

Free games online

October 7. 2009 01:40

ACNE TREATMENT

No JavaScript programming is required. This control can be combined with ASP.NET AJAX capabilities to provide ASP.NET Serverside processing without the need of coding in JavaScript.Thanks for shareing the posts.
Regards,

ACNE TREATMENT

October 7. 2009 21:27

 Super Colon Cleanse

So now that you have the got the control installed on your computer and you have installed the ctp you can then go ahead and get started.

Super Colon Cleanse

October 9. 2009 04:33

trading pins

What is the HTML code to display text without further page loading?

trading pins

October 12. 2009 01:39

riverbelle casino

Now we are going to go ahead and set some properties. First we should have a look at the parameters created when dragging the control from the Toolbox and dropping it on a Web page. The default values in the description are also those created when dragging the control from the Toolbox and dropping it on a Web page.

riverbelle casino

October 15. 2009 01:46

promotional flash drives

Hi,

The topic which you have discussed is very informative as well as valuable for all...Thanks for providing this information for us....

promotional flash drives

October 19. 2009 04:24

Apex Professionals LLC

Fantastic walk-through. I appreciate this post.There is obviously a lot to know about this. I think you made some good points in Feature also.Thanks for sharing.

Apex Professionals LLC

October 20. 2009 01:35

Antivirus software

Hi,

Whats the difference between mcafee antivirus enterprise and regular antivirus?

Antivirus software

October 20. 2009 03:43

green tea benefits

Useful information shared..Iam very happy to read this article..thanks for giving us nice info.Fantastic walk-through. I appreciate this post

green tea benefits

October 22. 2009 02:54

Alanda Homes

Give more details about Response.Redirect and Server.Transfer Demystified.

Alanda Homes

October 24. 2009 23:49

green tea extract

I enjoyed reading it. I need to read more on this topic...I admiring time and effort you put in your blog, because it is obviously one great place where I can find lot of useful info..

green tea extract

October 26. 2009 03:02

payday loans

Just try to smile for about 2-3 mins then you can get back to work

payday loans

October 29. 2009 23:08

wine tasting

I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts.Thanks for sharing this information about Goa in the Monsoon I really enjoy reading on it.

wine tasting

November 9. 2009 06:22

san diego real estate

I enjoyed reading it. But, I need to read more on this topic. Kindly, Give more details about Response, Redirect and Server and Transfer Demystified. So, I will visit it again soon and wish that I leave even more satisfied.

san diego real estate

November 10. 2009 06:26

Income protection insurance 

The first use of the word "computer" was recorded in 1613, referring to a person who carried out calculations, or computations, and the word continued to be used in that sense until the middle of the 20th century. From the end of the 19th century onwards though, the word began to take on its more familiar meaning, describing a machine that carries out computations.[3]

Income protection insurance 

Comments are closed