Google Map Locations

To use Google Map Locations plugin on your site, you should set up a Google Project and connect it to your SkaDate website/apps.

SkaDate team needs following access details to configure  Locations Map plugin for you:

After sharing access details, make sure to notify SkaDate Support or your PM via email or ticket and specify your project name so that we can identify and accept your invites.


If you would like to configure plugin yourself, follow instructions bellow:

Create a project
Enable APIs
Create credentials restricted by HTTP referrer ( for desktop and mobile versions)
Create credentials restricted by IP referrer (for web and native apps)
Enable Billing
Setup Location Maps plugin


Create a project
 
1. Open Google API Console
2. Click on the arrow next to "Select project" switcher in the upper left  corner of Console
3. Click "New project" to create a project within opened pop up
4. Give your project a name. Ex: Sitename Locations Map




Enable APIs

1. Click on the arrow next to "Select project" switcher in the upper left  corner of Console
2. Select a project created earlier. Wait until page reloads
3. Click  "APIs" ( same as Library) within left navigation bar if you are not redirected to this page automatically after selecting the project
4. Type  Maps JavaScript API  into search box>  Click "Maps JavaScript API" from search results



5. Click Enable



6. Go back to "APIs" ( same as Library) from the left navigation bar and in a similar manner enable following APIs:
  • GeoCoding API

7. If you are using web apps (PWA) or native iOS/Android apps enable following additional API: 
  •  Places API

Create Credentials restricted by HTTP referrer ( for desktop and mobile versions)


1. Click  "Credentials" within left navigation bar and then click "Create Credentials" button.
2. Select "API key" option.

Create Googoe Map Locations - credentials

3. Click Restrict key button
4. Give your key a name. Example: Locations Map Desktop key
5. Under Application restrictions select "HTTP referrers (web sites) " and enter your domain into "Accept requests from these HTTP referrers (web sites)" field in 2 formats:
Format1: https://www.example.com/(Example: https://www.demo.skadate.com/*)
Format2: https://example.com/* (Example: https://demo.skadate.com/*)
 
Save changes.
restricting Google Map Locations keys

Create Credentials restricted by IP referrer ( for the web (PWA) and native apps))


If you are using native or web apps in addition to API key restricted by HTTP, create a second key:

1. Click  "Credentials" within left navigation bar and then click "Create Credentials" button.
2. Select "API key" option.

Create Googoe Map Locations - credentials

3. Click Restrict key button
4. Give your key a name. Example: Locations Map Apps key
5. Under Application restrictions select "IP addresses (web servers, cron jobs, etc.)" and enter your server's IP address into "Accept requests from these server IP addresses " field. Example: 52.22.249.61 . Use this IP address if you are using SkaDate Hosting. Save changes.
restricting Google Map Locations keys by IP


Enable Billing

Resource: https://developers.google.com/maps/documentation/geocoding/usage-and-billing?hl=en_US

As of July 16, 2018, to continue to use the Google Maps Platform APIs, you must enable billing on each of your projects. If you choose not to add a billing account, your maps will be degraded, or other Maps API requests will return an error.

For information on Google Map usage pricing please refer to https://cloud.google.com/maps-platform/pricing/ or contact Google's sales team.

To enable billing:

1. Click on the arrow next to “Select project” switcher in the upper left  corner of Console
2. Select the desired project and wait until page reloads.
3. Click "Billing" from the main navigation menu
4. Click "Link a Billing account".
5. Follow on-screen instructions

Locations map enable billing


Setup Location Maps plugin


1. Go to Admin panel > Plugins > Installed Plugins 
If the plugin is within the "Inactive" list, activate the plugin first.

If the plugin is not available under "Installed" plugins go to "Available plugins" and install > activate the plugin first.
If the plugin is not present under "Installed" and "Available" plugins lists, download plugin from SkaDate Customer area and install it.

3. After the plugin has been activated mouse hover over the plugin > click "Settings"
4. Settings pages will open:

  • select "Google" under Map provider
  • enter the API key restricted by HTTP  into "API Key" field
  • select the country to restrict locations by. Example: if you restrict by "Canada", users will not be able to enter locations outside of Canada during registration and search.
  • select miles or kilometers  under "Distanсe Units"
  • check "Auto fill location on search" if you would like the plugin to save entered locations for next searches.
  • check "Should map be displayed on join, profile edit, profile view pages?" to display the map in listed areas.

      Example if disabled map view ( left) and enabled map view ( right).

 

Locations map display disabled

Locatioons map enabled map view

 

 

 



 

 







5. If you are using web apps or native apps add API key restricted by IP into settings of SkaDate Mobile Applications plugin.

  • 5 Users Found This Useful
Was this answer helpful?