User Locations Setup


This document provides instructions on how to configure the display of location fields in the user profile and map in the member directories using the User Location extension.

Installing & activating

To add the User Location extension to your site please do the following:

  1. Download the plugin zip folder from here.
  2. Install the plugin by uploading it to your site by going to Plugins > Add new > Upload plugin.
  3. On the upload plugin page click on the “choose file” button and select the User Location zip folder from your computer.
  4. Once the file appears on the screen click the “Install now” button to install the plugin.
  5. Wait until “Plugin installed successfully” message appears.
  6. Click the “Activate plugin” link to complete the activation.

Google Maps API keys

After you have activated the plugin you will be redirected to the installed plugins page where you should see the following notice

For the User Location extension to work on your site you need to generate Google Maps API key. If you already have the key you can skip the next section. If you do not have your Google Maps API key already then click the “Generate your API key” button where you will be taken to the official Google Maps API website.

Generating your Google Maps API key

Google Maps JavaScript API is a part of Google Maps Platform in Google Cloud Platform so you need to be registered at Google Cloud Platform. If you are a new user, click the button "Get Started" and go through the registration process. For the User Location extension to work correctly, you need to use Maps and Places products in Google Maps Platform.

Please enable your APIs and get API key as shown in the screenshots below

If you already have a registered Maps JavaScript API, you can copy the key by clicking on the following links

Settings page

Once you have your API key go to the Ultimate Member > Setting > Extensions > User Location section

Once you have successfully entered the correct key the Google Map can be added to User Forms (Registration/Profile) or Member Directories. Please note the Google Maps will not show until you enter the key. If you enter the wrong key you will see an error appear on the forms or member directories where the Google Maps should be.

The settings below the key could customize Google Maps settings. Map height, Starting map zoom level, Starting address latitude/longitude will be applied for User Location fields on the user forms.

Adding User Location fields on Form

You could create 1 or more custom fields with User Location type. You will see the standard dialog of the custom field's creation process. Please note: the meta key you specify will be used as the base prefix. Real data will be stored in "{metakey}_lat", "{metakey}_lng", "{metakey}_url" meta rows.

There is a User Location field's layout. You could use Google Autocomplete to find the necessary location or get the current location via the button on the right of the field.

Adding Map to the Member Directory

You could add a map to the member directories and show the markers of one of the ones you created custom fields with User Location type. Once you have successfully entered the correct key the Google Map you will be able to see member directory meta box with the settings below.

Show this user location field at the map - This option allows you to select what user location markers will be displayed on the map.

Map height - This option allows you to customize a map height, it's Map Height from the extension settings by default.

Searching when dragging a map - This option allows you to search the members via the map bounds.

Choose field(s) to display in marker's infowindow - This option allows you to select what information do you need to show in the marker's infowindow.

There is a map on a member directory for the showing users' locations.

There is a map on a member directory for the showing users' locations only in the visible map's bounds.