(→Get the API) |
|||
Line 6: | Line 6: | ||
:::[[File:Get-a-key.png]] | :::[[File: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. | Create the project if you don't have one already and agree to the terms of services then press "Create and enable api" button. | ||
− | :::[[File: | + | :::[[File:google-map.jpeg]] |
− | The screen with your | + | |
+ | The screen with your new api key will show up. <br/> | ||
+ | :::[[File: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''' | Copy the key and paste it into the appropriate Api key field which is located in '''JomSocial Backend''' -> '''Configuration''' -> '''Integrations''' -> '''Google Maps''' | ||
+ | |||
:::[[File:Api-field-maps.png]] | :::[[File: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== | ==Select the location field== |
Latest revision as of 01:28, 4 September 2020
Contents
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.
Create the project if you don't have one already and agree to the terms of services then press "Create and enable api" button.
The screen with your new api key will show up.
Copy the key and paste it into the appropriate Api key field which is located in JomSocial Backend -> Configuration -> Integrations -> Google Maps
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.
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.