Apologies for the flurry of posts here in the last 24 hours, I’m trying to get things up that I’ve left in open browser tabs knowing I wanted to capture them someplace useful beyond my del.icio.us bookmarks.

This topic is pretty neat though, because it’s really so simple and yet has high wow-to-effort ratio. Live Earth from Microsoft works slightly differently, but Google Maps API is really quite easy to plug into, even from a SharePoint page. They call this a “mashup” because you’re mixing media here in some delightful new way. Here’s what you need to do:

  1. Read through the Static Maps API Developer’s Guide from Google. Google has two map APIs, one for dynamic maps (the kind you can drag within the window) and static maps (which appear frozen but are also generated on-the-fly). I’ll go with static for the time being.
  2. You have to register for a Google Map API key (it’s free).
  3. Then all you need to do is pass some parameters to the API via your page! Here’s a full URL: http://maps.google.com/staticmap?center=40.714728,-73.998672&zoom=14
    &size=512x512&maptype=mobile&markers=40.702147,-74.015794,blues|
    40.711614,-74.012318,greeng|40.718217,-73.998284,redc&key=XXXXX

So here’s what you’re passing above:

  • Longitude for the center of the map
  • Latitude for the center of the map
  • the level of the zoom (in/out) you want for the map
  • the size of the image you want (512 x 512)
  • the maptype (for mobile, normal, etc.)
  • then you describe what points you would like laid out on the map, what Google calls “markers.” Each of these has:
  • a color for the marker, as well as a size (normal, tiny, mid-sized)
  • a letter or character to appear in the marker pin
  • longitude and latitude for the marker itself
  • the parameters for each marker are comma-separated, and each set of marker parameters are separated by a “|” character
  • finally, your API key (the XXXXX at the end is where this would go)

So the image above would end up looking like this:

Cascading drop-down lists are a nice trick in a form — where the value from one DDL determines the given values in the next one, which winnow down the next one, and so on. In regular ASP.NET programming you do this by passing the selectedvalue or selectedindex of the first DDL as a parameter to the next DDL.

It’s not too difficult to do this in InfoPath, but we currently have a pretty extensive SharePoint document library project where this would be handy. So putting this feature in place there is on my current task list. As I was trying to gather resources for it, I ran across this helpful post on Datacogs.

Example of a cascading ddl

U2U CAML Query Builder

April 29, 2008

What is CAML? This definition from Microsoft:

Collaborative Application Markup Language (CAML) is the XML-based language that is used to build and customize Web sites based on SharePoint™ Team Services from Microsoft®.

CAML can be used to do the following:

  • Provide schema definition to the Web site provisioning system about how the site looks and acts.
  • Define views and forms for data and page rendering or execution.
  • Act as a rendering language that performs functions in the DLL like pulling a value from a particular field.
  • Provide batch functionality for posting multiple commands to the server using protocol.

Anyhow, it’s not something I am yet familiar with, and writing good CAML is obviously important. So there’s this code from U2U that plugs right into your MOSS lists or libraries. From Karine Bosch – ready to install as a solution, then grab the code it generates.

http://www.u2u.info/Blogs/karine/Lists/Posts/Post.aspx?ID=3

Since MOSS includes InfoPath Forms Services, it’s really nice to embed InfoPath forms directly in the web page and have SharePoint remain the interface — and so the user doesn’t have to own the IP desktop client. And it’s really pretty simple to plug the form into a MOSS forms library to collect the submitted results of the forms. But for something a bit more complicated, it would be nice to keep the form embedded but submit directly to a DATABASE. Again, this isn’t very difficult if you’re using a form template within the IP client, but if you’re embedding the form using Forms Services you *have* to access SQL by way of a web service.

Here’s a great posting from MSDN on just how to do it:

http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx

A new blog…

April 29, 2008

Interviewer: Why are you moving all your SharePoint-related postings to this new blog?

Neal: Well, it seemed like between posts of SharePoint tips and stuff from work, alongside posts of our daughter swimming in the pool at age 2 and political cartoons, it just seemed smart to separate them a bit.

Interviewer: Okay, I can understand that. But WHY on earth would you choose WordPress for this and not just host one on one of your SharePoint servers??

Neal: Yeah, I knew you were going to ask this. The blog feature in MOSS 2007 is okay, but not nearly as nice or full-featured as WordPress is. And, it just so happens that another division within the Union is rolling out some WordPress stuff and I had to get the server configured over the last few days. Maybe I’ll move it over there eventually, but this seemed as good a place as any to have an open, fully-accessible, rich repository of things I’ve come across and learned. It’s probably more for my own good than it is for everyone else’s!

Interviewer: Well, thanks for answering our very tough questions, Neal. It’s a stunning and remarkable job you’re doing, and we’re all in awe. Okay maybe not.