Some plugins and site integrations generate a Google map through their API system instead of using a map embed. In this article we'll walk you through the requirements of using the Google Maps API. Let's get started!
Log into the Google Maps Platform
Create an account or use an existing gmail account and log in at https://developers.google.com/maps/. Once logged in, find the "Get Started" button in the upper right corner of the page and click it (Fig. 1).
You may be prompted to fill out a quick business survey and a demo API key. We will want to limit what APIs are used so click "Maybe Later" to cancel out of the demo.
Once you're through all that we'll be in the general Maps API interface.
Create Your Maps Project
In a new Google Maps account there should be a "Create Project" button on every page to get you started. Alternatively, there is a dropdown menu in the blue top bar to view all projects on the account and create new ones (Fig. 2). Name your new project and click "Create."
Providing Delegate Access to your Project
Google now offers account sharing through IAM & Admin interface. If you'd rather set up your API yourself skip down to "Create Your Project API." Otherwise, just give us access and we can take it from here. In the left-sidebar menu, hover over "IAM & Admin" and click "IAM" (Fig. 3) and you will be taken to the Project Permissions page.
Towards the top-left of this screen click "Add +" (Fig. 4) to open a slide-out interface. Enter the email address of the user you want to grant access to as the New Principle and grant them the "Owner" role. Then let us know and you're all set!
Create Your Project API
- Directions API
- Places API
- Geocoding API
Google's new interface prompts you to set up billing for your free Google Cloud trial. However, if you are using an older account you may need to manually setup and attach your project to a billing account. Click the hamburger menu in the blue top bar and select "Billing." If you've previously set up a billing account you can link it from this interface, otherwise you'll need to click "Manage Billing Accounts" and set one up.
Obtain Your API Key
All that's left is to create your API key! Be sure your project is still selected in the top bar drop down menu, then click the hamburger icon and select "API & Services." Select "Credentials" in the left-hand sidebar (Fig. 5) then click "Create Credentials" (Fig. 6) at the top of the page and select API Key. Copy that key and place it in your theme or plugin settings and now you've got Google maps!