Get a key for Google Maps

Due to changes in the way Google Maps works, you must now open an account on their API service in order to use a custom map, such as the geolocation appearing in the member directory.

Please note that although the service is free, you will still need to provide a credit card information in order to use it.

Create a key for the API

Go to the site https://console.cloud.google.com/

You'll need to sign in with a Google Account and agree to the Terms of Service in order to proceed.

At the top of the page, click Free Trial.

google-cloud-essaie.PNG

Fill in the form with your billing information. This information is used to prove your identity and you will not be billed without Google's notice.

Once you've created your account, click the APIs and Services menu in the left column. Then click the Enable APIs and services button at the top of the screen.

mceclip1.png

In the list of services that appear, select Maps JavaScript API and click the Enable button. 

Repeat with Places API and Geocoding API.

mceclip2.png

mceclip3.png

You will be redirected to the dashboard of this API. Click on the Identifiers submenu and click Create Identifiers. From the options, select API Key.

mceclip4.png

You will then get a key that you can use in Yapla. To protect the key from external users, click Restrict Key to allow the key only on your site.

Select the HTTPS referrer restriction, and then enter all the urls that will be used on your site (your Yapla url as well as your custom domain name). You can finalize the url with /* to make the key work on all pages of your site.

 mceclip5.png

Adding a second key for Geolocation

Once the first key done, in the submenu APIs & Services/Credentials, click on Create Credentials.

 

create-credentials.jpg

 

Create a second key with an IP address restriction and the following addresses:

99.79.153.179
99.79.159.163
52.212.157.23
52.212.170.179
52.60.140.239

 

ip-addresses-restrictions.jpg

In the API restriction, add the Places, Geocoding ans Geolocation API.

api-restrictions.jpg

 

Add the key in Yapla

Once you have activated your keys, all you have to do is add it to Yapla.

Open the website where you want to display a dynamic map and open the Tools submenu. In the Google Maps section, paste your first key in the Google Maps section and the second one in the Google Places and Geo sections. Save.

 tools-google-maps.png

Warning: the Google Maps API has a delay of a few minutes before being deployed, so it's possible that your map won't be functional immediately after you add the key. If you still have errors after 15 minutes, open your dashboard on Google Cloud and check your key for errors.

 

Was this article useful?

1 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.