One of the new features in SharePoint 2013 is the Geolocation field. You can learn more about it here in the MSDN. As I was developing some new SharePoint 2013 demos for my upcoming sessions at the SharePoint Connections Fall 2012 Conference I started looking into this new functionality. My goal was to see how I could use the new Geolocation field type it to replace the Silverlight Bing Maps control I created for my SharePoint 2010 mashup demo.

As I went through the MSDN examples I saw that all of the examples and code samples use command line programs to create the Geolocation field and map-enabled list view that relies on the Geolocation field. Personally, I’m not a fan of using command line tools when I develop solutions, I’d rather have something with a simple user interface that allows me to create new components quickly and easily without having to open a command prompt and remember the syntax associated with the command line program or a script. If you have been following my blog for a while you’re probably familiar with the SharePoint Feature Manager I created about 6 years ago to manage features for a SharePoint site which falls into this same category.

So, along these lines, I decided to create a simple SharePoint Hosted App that allows me to easily specify which list I would like to add a Geolocation field to, give the Geolocation field a name, specify a name for the map-enabled list view that relies on the Geolocation field, and click a button or two to make everything for me.

This is also a fantastic way to roll out this functionality to your users and give them self service capabilities to create this type of functionality directly from a web browser.

It turned out to be a very easy exercise! Here’s what the SP APP looks like.

Just fill in the values, click the buttons the Geolocation field, and the Geolocation column and the map-enabled view are created in the target list as you can see below.

Here’s what the new Map list view looks like. That’s some pretty sweet out of the box functionality!

Here’s how I went about it. First, I added some simple controls to the default.aspx page.

<%-- The markup and script in the following Content element will be placed in the <head> of the page --%><asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server"> <script type="text/javascript" src="../Scripts/jquery-1.6.2.min.js"></script>

Nicely done. I can’t wait to start digging in to some of these new features in SP2013 and the new App model.

About Todd

I'm (Todd Baginski), a eleven-time Microsoft SharePoint Server MVP, O365 and SharePoint Top 25 Influencer, and Sitecore Certified Professional Developer whose blog focuses on Microsoft SharePoint, Office 365, Azure, Mobile, Office, and cloud technologies. I am a Partner and the CTO at Canviz Consulting. In my free time I enjoy playing with my son, relaxing with my wife, and playing a variety of sports like skiing, lacrosse, hockey, and softball.