This last Thursday night I had the pleasure of giving a presentation to Indianapolis .NET Developers Association (IndyNDA). First and foremost I would like to thank the leaders, members and guests from the group. It was an enthusiastic crowd that had lots of good questions and ideas to share. You guys totally rock:

GIF of people with metal horns

The presentation

I came up with the idea for the presentation when Brad Jones, the President of the user group asked me in an e-mail a couple of weeks ago “What are you going to talk about?”. I thought about some of the topics that have been “hot”” lately. Programming against the Facebook has come up a lot lately. I showed a demo of a Facebook application at the last round of ArcReady programs. Dave Bost and I just published an episode of The Thirsty Developer on the Facebook Developer Toolkit. So I thought about putting together a presentation about how to tap into the various APIs that exist out on the Internet. Facebook, Flickr and Twitter are my favorite social networks and all of them have very rich APIs. I thought I would also throw in a little Virtual Earth action to round it out.

The Code

I showed a couple of examples during the presentation. The first sample, which was tapping into the Virtual Earth APIs using the JavaScript. The sample was pretty basic, and it was meant to show how quickly you could add a map to your site:

Screenshot of an app

To setup a map like this you need to reference the JavaScript file on the website. You also need to setup a div tag that is the target of the map. In the body tag of the HTML. Call a function, in my case it was GetMap(). The rest of the work is done with the following JavaScript which loads the map, adds the pushpins from an array using a JavaScript prototype object.

Note: This code snippet is provided under the Microsoft Permissive License. The permissive license is an OSI approved shared source license. It does not require you to share your source code with anyone, but if you do something cool building on this sample, please considering sharing it with others.

I will do a walk through of the Silverlight Interface to Virtual Earth in a forthcoming blog post. (1.02 KB)