Nick's profileSharePoint DevelopmentBlogListsNetwork Tools Help

Blog


    April 09

    SharePoint 2007 Virtual Earth Custom Web Part

    Hello, again.  Consider yourself lucky because I’m dropping two posts in a single day!  A rarity, for sure.

    About five months ago I created a Virtual Earth page for a client’s distributor locations around the world.  The tricky part was pulling all of this location data from a SharePoint list.  As most of you already know (or maybe you don’t), the Virtual Earth routines are all client side JavaScript.  Knowing that, you will then realize that accessing SharePoint List items is done through either A.) the SharePoint Object Model in .Net or B.) SharePoint list web services.

    Initially, I built out a separate .Net web application that pulled all of the location data from the list, wrote out separate JavaScript arrays for the location data to the client, and then pointed the Virtual Earth routines at those arrays in order to build map points.  Heavy, I know.  And by heavy, I mean lethargic on Page Load.  But hey, give me a break, mixing server side and client side code is never a fun time.  It’s also incredibly difficult to maintain.  In the end, it was the most stable method.  Stability is paramount in this case as the application is being hosted on a public website.  (In case you want to see it in action, head on over to this SITE ).

    Rewind again another month.  I stumbled upon an updated version of the Windows Live Server Controls.  Granted it’s in CTP release and nowhere near ready for primetime, I decided to tinker with their Virtual Earth Server Control.  With just one relatively simple routine I was able to process every location in the SharePoint list with absolutely zero client side code! 

    Now, instead of fussing with a separate web application stuffed into a Page Viewer Web Part, users can simply drag and drop the Virtual Earth web part onto the page!  And because I am such a sweetheart and am totally against leading people on, I have embedded a short YouTube clip as proof.

    (Sadly, there is no audio so you will be unable to hear my soothing radio voice.  Sorry, world.)

      

    You will notice that I simply put the SharePoint page in Edit Mode, search for the VirtualEarth web part, and drag/drop it onto the page.  Voila!  Next, I display the corresponding SharePoint list that houses the location titles, descriptions (address info), latitude/longitudes, etc.  Putting map locations in a list not only empowers users to manage and own their content, it cuts down on IT operations overhead.  A win-win, if you ask me.

    Comments

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Trackbacks

    The trackback URL for this entry is:
    http://customsharepoint.spaces.live.com/blog/cns!41D760DBB8E4E638!177.trak
    Weblogs that reference this entry
    • None