Setting up Location integration

Overview

Starting from Jomsocial 4.3, a radius search can be performed and distance can also be displayed in the profile or tooltips and memberlists.

Get the API

Go to the Google Maps website and press "Get A Key" button.

Get-a-key.png

Create the project if you don't have one already and agree to the terms of services then press "Create and enable api" button.

Google-map.jpeg

The screen with your new api key will show up.

Api-map.jpeg

Copy the key and paste it into the appropriate Api key field which is located in JomSocial Backend -> Configuration -> Integrations -> Google Maps

Api-field-maps.png


You need to enable the Google map API key for : - Places API - Geocoding API - Geolocation API - Maps Embed API - Maps JavaScript API - Maps Static API

Select the location field

In JomSocial Backend -> Configuration -> Integrations -> Google Maps, right under the API field, you will find the "Location Field" setting. Select what is the location field to measure the distance.


For OSM JomSocial Backend -> Configuration -> Integrations -> Open street Map, you will find the "Location Field" setting. Select what is the location field to measure the distance.


Open-street-map-integration-jomsocial.jpeg


We suggest you use the real location field introduced with JomSocial 4.3 but any other location related field like city or country will do

Show distance in member lists

Go to JomSocial Backend -> Theme Designer -> Layouts.
Enable the Display the distance from currently logged in user option.

Enable radius search

Go to JomSocial Backend -> Configuration -> Site.
In Advanced Search pane, find the option Enable radius search and make sure it is enabled.
You can also select the metric or imperial measurements to display units in miles or kilometers.

See Also