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.
Important : Please note that although the service is free, you will still need to provide a credit card information in order to use it. You can access billing information anytime by visiting this link: https://console.cloud.google.com/billing/
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.
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.
In the list of services that appear, select Maps JavaScript AP.
You will be redirected to the dashboard for that API. Click Activate and then confirm the billing account for your project. Repeat with Places API and Geocoding API.
Go to the Credentials tab, click on + Create credentials, select API Key. Once created, click on the key.
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 Websites 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.
Adding a second key for Geolocation
Once the first key done, in the submenu APIs & Services/Credentials, click on Create Credentials.
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
In the API restriction, add the Places, Geocoding ans Geolocation API.
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.
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.
Comments
Please sign in to leave a comment.