Jim Bonnie's Blog

Feb 20

Written by: jbonnie
Wednesday, February 20, 2008 8:23:19 PM 

A simple Virtual Earth module has been posted on the downloads section.

It basically shows how to wire up a special javasscript onload event that you put in your module ascx file.

The simple steps to start are:

1) Create a Module and put javascript in to reference Microsofts VE library

<___script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=5"><____/script>

2) create a div that will will hold the Virtual Earth Map

3) Add the Javascript onload Function that will create and dsiplay your map

 

var map = null;var lat = 41.500548;var lon = -72.206397;var zoom = 12;function myOnPageLoad()new VEMap('myMap');new VELatLong(lat, lon), zoom, "r", false);

4) on your modules onload event wireup your onload event from the ascx file

DotNetNuke.UI.Utilities.

DNNClientAPI.AddBodyOnloadEventHandler(Page, "myOnPageLoad();");

 

 

Tags:

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Add Comment   Cancel 

Navigation

Register Login

About Me

Thanks for stopping by. My name is Jim Bonnie and I have been writing software for over 20 years. After building financial data systems for Reuters for nearly 18 years I have started doing contract work and am excited about technology and currently focus on Microsoft solutions. DotNetNuke has helped provide a good introduction to ASP.NET web application development, and I am now starting to branch out into other areas. Data Access techniques and SubSonic is something that I am looking into now. This has helped me get an invitation to speak at Las Vegas at DNN Open Force 07. it was a great time. And I am looking forward to OpenForce08, where I wil be presenting on TDD for DNN.

 

Reading the codebetter blogs and attending a nothing but .net training class with JP Boodhoo helped spark my interest in ALT.NET. I attended the first conference in Austin Texas, and it was amazing to see Scott Guthrie introduce the ASP.NET MVC framework.

Add to Technorati Favorites

View blog top tags

Links

Jim Bonnie's Blog

Jim Bonnie's Blog

Jim Bonnie's Blog