Creating SharePoint 2013 Geolocation field using Google Maps

SharePoint 2013 Preview introduces a new field type named Geolocation that enables you to annotate SharePoint lists with location information. In columns of type Geolocation, you can enter location information as a pair of latitude and longitude coordinates in decimal degrees, or retrieve the coordinates of the user’s current location from the browser if it implements the W3C Geolocation API. For more information about the Geolocation field, see Integrating location and map functionality in SharePoint 2013.

By default location is rendered using Bing Maps but it could be customized, for example by creating custom Geolocation field that renders Nokia Maps as described here.

What about another Map providers, let’s take a look on how to implement geolocation field that renders Google Maps.

First of all we need to create custom Geolocation field, for details  see How to: Create a custom Geolocation field that renders using Nokia Maps.
Here we will only  implement Geolocation field template for Google Maps, all the remaining steps the same as described in How to: Create a custom Geolocation field that renders using Nokia Maps. This is client side rendering template file that  JSLink method of the field class points to, for more information see  How to: Customize a field type using client-side rendering

Below is presented  GMapsGeolocatioFieldTemplate.js rendering template for Google Maps.

SharePoint 2013 project with implementation of custom geolocation field that renders Google Maps may be found here.

Results

  • Creating Google Maps Geolocation column
  • List view with Google Maps Geolocation column
  • Create or edit form with Google Maps Geolocation column

For searching locations on Edit form is used Google Geocoding API.

References

Advertisements

7 thoughts on “Creating SharePoint 2013 Geolocation field using Google Maps

  1. I downloaded your .wsp, installed and deployed it successfully, but I cant find the GoogleMaps-Column anywhere on my farm. Where to find the column?

    • Hi Moritz,
      there are several ways on how to add custom Gelocation column that renders Google Maps
      a)create new List or Library, for example Custom List (View Site Contents add an app Custom List) and add new column to it (it is named Google Maps Geolocation column)
      b) use an existing List or Library, for example Documents library and add new column to it the same way as before
      c) add this column programmatically to new or existing library as described here http://msdn.microsoft.com/en-us/library/jj164050(v=office.15).aspx. For specified example use for field Type GMapFieldGeolocation instead of Geolocation.

      P.S. I will try to find out why it is not shown in Site Columns and let you know.
      Thanks on pointing on this issue!
      Vadim

  2. Pingback: Bringing Map functionality into SharePoint 2010: Rendering Map List View | vgrem's Blog

  3. Pingback: google maps geolocation - Search Yours

  4. Pingback: Working with Geo Location Fields in SharePoint 2013 | unnie ayilliath

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s