Skip to main content

Location Finder

This web part displays all of your office locations on a Google Map. With integration with People Hub users can find an office location and then click through to see all the employees within that location.

Features

  • Display locations from a SharePoint list
  • Control the fields that display within the list view and pin information panel using templates
  • Location search using post code or suburb - power by google search
  • Link to People Hub web part to filter directory based on selected location.
  • Filter results by category
  • Filter results by free text search
  • Handles 1000's of locations and implements clustering on the map
  • Display regions on the map using Google's Polygon feature. Data pulled from SharePoint list.
  • Uses the browsers GPS location as the default start position on load
  • Accepts query string parameters to filter or select a location on load
  • Mobile friendly
  • Automatically provisions required lists. Although you can specify your own list or list within another site.

Requirements

This web part uses Google Maps which requires you provide your own API key.

The following Google Maps APIs must be enabled:

  • Maps Javascript API
  • Places API
  • Geocoding API

Configuration

SettingComment
Google API KeySpecify your Google API key. Ensure required apis are enabled.
Default LatitudeIf the browsers location has been blocked by the user then this will be the default centre of map.
Default LongitudeIf the browsers location has been blocked by the user then this will be the default centre of map.
UnitsSelect Metric or Imperial
HeightOverall height of map
ZoomWhen the map first loads this is the magnification of the map. Once loaded the user will be zoom in and out as expected
Default Map TypeSelect Map or Satellite
Location Item TemplateSpecify the HTML template within dynamic variables to control the display of the left list of locations. Any columns from your SharePoint list can be referenced (ensure you use internal column name.
Info Window TemplateSpecify the HTML template within dynamic variables to control the display of the pins information panel that pops on selection. Any columns from your SharePoint list can be referenced (ensure you use internal column name.
People Hub UrlOptional. Page URL of where People Hub) web part is configured. Pass through query string values to filter People Hub Results. The query string must contain '?peopleHubFieldName={{locationFieldName}}'. Where 'peopleHubFieldName' is a column in the People Hub Webpart and 'locationFieldName' is a property from the Locations list. For example '?office={{Title}}'

Obtaining Google API Key

note

When you sign up for this, it asks for credit card details. Note that NO payment is required, however it requires the card as security.

info

Google APIs are consumption billing. Typically only large organisations with many visitors will incur costs (i.e. if you have more than 28,000 visits/per month).

  1. Navigate to https://developers.google.com/maps/get-started#create-project
  2. Ensure your billing account is configured and a credit card is listed.

alt text

  1. Ensure the following APIs are enabled:
  • Maps JavaScript API
  • Places API
  • Geocoding API

If you aren’t sure if these are enabled, locate the API, click on it and check to see if says ‘Enable’ if so, click this button to ensure it is enabled. See below.

alt text

  1. Obtain API Key - Navigate to ‘Credentials’ on the left-hand side of the Google Maps Platform. Click SHOW KEY on the ‘Maps API Key’. Copy to your clipboard and paste into the Sprocket settings of Location Finder web part.

alt text

More information regarding Google APIs is available online at https://developers.google.com/maps/gmp-get-started.