Office Seat Map webpart

In our efforts to make the most of our intranet, and the SharePoint intranets projects we deliver, I'm developing a Silverlight based, Office Map webpart. I like to think of it as a Google Maps, or Virtual Earth, for the enterprise cubicles.

It's fairly simple stuff right now, I'm querying contact information from the MOSS User Profiles store and I'm displaying it associated to a x,y pair of coordinates on top of an office map image, Silverlight is just perfect for this kind of stuff. Profiles positioning is a drag and drop task carried out by and admin.

This is what it looks like now,

 office seat map webpart

Some scenarios I think a tool like this could come in handy are:

  • Mapping names to faces, and viceversa (what was the name again of the new guy seated over there?)
  • Geo querying workmates basic contact information (phone, email, mobile)
  • Locating resources, printers, shredders in the office (ok, I've just sent ten copies to HP LaserJet 3320, now where the heck is that printer?)
  • Management Office space, and seat assignment planning. Designing and sharing possible seat layouts.
  • Communicating seat assignments highlighting only those who've been moved

It'd be cool to integrate it to a map provider like Virtual Earth, zooming in from the world map to the office building, into the seat map.

Published Friday, June 27, 2008 12:57 AM by gabouy

Comments

# re: Office Seat Map webpart

Friday, June 27, 2008 9:48 AM by Carmine

What a great idea! Are you able to post your source on this project? Thanks!

# re: Office Seat Map webpart

Friday, June 27, 2008 10:22 AM by gabouy

Carmine, Thanks! Since this code was paid for by one of our customers I cannot publish it without approval, If I get it I may do so in the future.

Andy, I'm using MOSS UserProfile web service (http://<moss>/_vti_bin/userprofileservice.asmx), in a two step process, first I query the user store with a high privileges account in a scheduled process which generates an xml file. The second step is consuming the generated xml, which is published in a web application and consumed as a REST web service from the silverlight app.

This is the piece of code I'm using to query the MOSS User profile store:

       public static List<Profile> GetUserProfiles()

       {

           List<Profile> profiles = new List<Profile>();

           Dictionary<string, Profile> dictionary = new Dictionary<string, Profile>();

           MOSSUserProfile.UserProfileService service = new UserProfileService();

           service.Credentials = System.Net.CredentialCache.DefaultCredentials;

           int numProfiles = (int)service.GetUserProfileCount();

           for (int i = 0; i < numProfiles; i++)

           {

               Profile p = new Profile();

               PropertyData[] properties = service.GetUserProfileByIndex(i).UserProfile;                                    

               p.AccountName = GetPropertyStringValue("AccountName", properties);

               if (!dictionary.ContainsKey(p.AccountName))

               {

                   p.PictureUrl = GetPropertyStringValue("PictureURL", properties);

                   p.Name = GetPropertyStringValue("PreferredName", properties);

                   p.Mobile = GetPropertyStringValue("CellPhone", properties);

                   p.PhoneExtension= GetPropertyStringValue("WorkPhone", properties);

                   p.Email = GetPropertyStringValue("WorkEmail", properties);

                   profiles.Add(p);

                   dictionary.Add(p.AccountName, p);

               }

           }

           profiles.Sort(new ProfileItemComparer());

           return profiles;

       }

# re: Office Seat Map webpart

Friday, July 18, 2008 4:18 PM by Craig

I take it you're not using WCF to query the profiles?  For some reason, I'm not able to call the GetUserProfileBy<> web methods. It throws a strange formatter exception.  But only in WCF. Works fine in .NET 2.0.

# re: Office Seat Map webpart

Saturday, July 19, 2008 12:58 PM by gabouy

No, I'm using regular web references to query MOSS web services.

Leave a Comment

(required) 
(required) 
(optional)
(required)