Finding User Groups in Mid-Atlantic

Are you looking for a .NET or SQL Server User Group? I'm hoping to make your task a little easier by adding a handy user group map to my blog. If you go to the homepage of my blog, and look in the section entitled "My Stuff," you'll find a new widget containing a Virtual Earth map of the active .NET and SQL Server user groups in the Mid-Atlantic area (if I missed yours, don't fret, just drop me a note, and I'll add you). If you click on the Expand link, it'll enlarge the map for better readability. You can also see the map in a larger size here.

I'm using a Live Search Maps collection to manage the user group locations, which makes it pretty easy to update locations, Urls, etc. without the need for a back-end database. And the Virtual Earth javascript API makes it easy to add a Live Search Maps collection as a layer on your map:

l = new VEShapeLayer();
var veLayerSpec = new VEShapeSourceSpecification(VEDataType.VECollection, collectionId, l);
map.ImportShapeLayerData(veLayerSpec, onFeedLoad);

where collectionId is the Live Search Maps collection ID. You can obtain the collection ID by saving a collection of map points, and then (in the Collections editor) clicking the Actions link, and selecting Add To Favorites. In the resulting dialog's Address box, the collection ID is the value that follows the cid= key.

The expand/restore script is pretty simple:

function ZoomToggle(mapelement, element) {
   if(zoomed == 0)
   {
       var img = mapelement;
       var div = element;
       img.style.border = 'medium black inset';
       img.style.width = '640';
       img.style.height = '480';
       GetMap();
       map.ShowDashboard();
       zoomed = 1;
       div.innerHTML = 'Restore -';
   }
   else
   {
       var img = mapelement;
       var div = element;
       img.style.border = '0px';
       img.style.width = '160';
       img.style.height = '120';
       GetMap();
       zoomed = 0;
       div.innerHTML = 'Expand +';
   }
}

Given that I'm still somewhat of a newb at javascript tricks (at least hand-coding, anyway) one thing I haven't figured out is how to make this script work in Firefox. I've got two similar scripts that drive my WorldMaps and LolCat widgets, but they are operating against an img tag, rather than a div, so I'm guessing that's the difference...just haven't worked out the workaround for the map. If anyone has a suggestion, I'd welcome it.

Similarly, I'm looking for help with a means in javascript to test for the existence of a method before calling it...if you can help with that, please add a comment below, or drop me a note.

If you're looking for user groups outside of Mid-Atlantic, you can also check out the new User Groups page on the newly-revamped INETA web site I mentioned the other day.