Welcome to MSDN Blogs Sign in | Join | Help

Can you add Virtual Earth to your ASP.NET 2.0 applications without writing JavaScript?

Heck yea!  Chris Pietschmann wrote a sweet little server control that does it!  In his own words "PietschSoft.VE is an ASP.NET 2.0 Virtual Earth Server Control. The goal of this control is to allow ASP.NET developers to utilize Virtual Earth mapping within their applications without requiring any JavaScript knowledge."  The full source code for the control is available at http://www.codeplex.com/PietschSoftVE3

I discovered the control while I was building my own for my Virtual Earth demos.  I have heard plenty of feedback from customers who don't want to write JavaScript.  Currently, the control uses the traditional "full postback" model used by many ASP.NET server controls.  This means that the map and all of it's previous state gets rebuilt on every postback (i.e every interaction with the map requiring execution of server-side code). 

The good news is that Chris has decided to release a new version of the control that "will have full support of the ASP.NET AJAX Extensions."  I built a proof of concept using the pushpin scenario from the control built by Chris.  I reworked it using the ASP.NET AJAX Control Toolkit.  If you have seen my Virtual Earth demos, then you've seen the proof of concept.

On the surface, you might think to yourself, "Just drop it in an UpdatePanel."  There are known issues with using the current control in an UpdatePanel.  However, even if you could, the entire map would be rebuilt on every "behind the scenes" postback intiated by the UpdatePanel/Trigger.  Ideally, what you want to do is render the map once.  On subsequent partial-page postbacks, you should be able to interact with the control server-side and send down the additional JavaScript needed on the client to incrementally add to the map.  The proof of concept I built uses this approach.  You can download it here

DISCLAIMER: This control was written as a "proof of concept" for my demos.  It is "AS-IS" and not without bugs;).  I didn't really think through all the hard scenarios that Chris will surely encounter.  I'm really looking forward to seeing the final product from Chris.

-Marc

Published Thursday, December 07, 2006 5:57 PM by Public Sector DPE Team

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Can you add Virtual Earth to your ASP.NET 2.0 applications without writing JavaScript?

Thursday, December 07, 2006 9:24 PM by Prog

Heck yea! Chris Pietschmann wrote a sweet little server control that does it! In his own words "PietschSoft.VE

# Link Listing - December 7, 2006

Friday, December 08, 2006 12:59 AM by Christopher Steen

Cool SharePoint Tool: SharePoint Inspector [Via: jantie ] Howto: Use a Vista DVD to duplicate any Windows...

# re: Can you add Virtual Earth to your ASP.NET 2.0 applications without writing JavaScript?

Friday, December 08, 2006 8:20 AM by pramodreddy ch

how to user draw a circle in virtual earth.

# re: Can you add Virtual Earth to your ASP.NET 2.0 applications without writing JavaScript?

Friday, December 08, 2006 8:34 AM by Public Sector DPE Team

pramodreddy,

There is no "draw circle" api in the v4 map control.  Your best bet is to draw a polygon or polyline that looks like a circle.

-Marc

# re: Can you add Virtual Earth to your ASP.NET 2.0 applications without writing JavaScript?

Saturday, December 23, 2006 8:06 AM by nay min thu

this is so cool!! many thanks to Chris!!

# re: Can you add Virtual Earth to your ASP.NET 2.0 applications without writing JavaScript?

Sunday, February 11, 2007 4:44 AM by Blackwater

This looks great!

Unfortunately it seems that work on PietschSoft.VE has stalled. :(

I love Chris' work so far, but I can't really use the control in my project unless I can drop it in an update panel.

Perhaps you and Chris could team up to bring us the next version of the control - one that supports ASP.NET AJAX 1.0?

Cheers,

Chris

# re: Can you add Virtual Earth to your ASP.NET 2.0 applications without writing JavaScript?

Thursday, March 29, 2007 8:50 AM by Michael Wikström

The only way to update the PietschSoft latest map seems to be to put it in an update panel, and yes it will be rebuilt on every postback :(, is there another way to do this? I have tried to run the proof of concept site and it didn´t produce any pushpins when i hit the buttons, I´m using latest ajax release.

# re: Can you add Virtual Earth to your ASP.NET 2.0 applications without writing JavaScript?

Wednesday, October 24, 2007 7:58 PM by Chris Pietschmann

There is a newer version of PietschSoft.VE (now renamed to Web.Maps.VE) that supports ASP.NET AJAX 1.0 available here: http://simplovation.com/Page/WebMapsVE.aspx

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker