# Google Maps

### To Obtain a Maps API Key:

**Step 1:** Navigate to the [Google API Console](https://console.cloud.google.com).&#x20;

**Step 2:** From the project drop-down menu, choose an existing project or create a new one by specifying a project name.&#x20;

**Step 3:** If this is your first time using Google API, you will encounter this screen after creating the project:

<div align="left"><figure><img src="https://1156155356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fpb8ANp0ZN6ZvWH8LcR5c%2Fuploads%2FogJ1j3YgdvuX3R2F3KUg%2Fgoogle-maps-1.png?alt=media&#x26;token=6c29056d-c49b-474b-8cb6-fd841371e2ea" alt=""><figcaption></figcaption></figure></div>

**Step 4:** Click the "**Enable APIs and Services**" button or select the "**Library**" button from the left-hand menu.&#x20;

**Step 5:** Locate the **Maps JavaScript API** and activate it following the instructions below.

<div align="left"><figure><img src="https://1156155356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fpb8ANp0ZN6ZvWH8LcR5c%2Fuploads%2F7uWLsiExdvFUdpr0pjJv%2Fgoogle-maps-2.png?alt=media&#x26;token=9950db86-ef51-4b36-93fa-84a71f2c0d0d" alt=""><figcaption></figcaption></figure></div>

**Step 6:** Access the menu icon, choose "**Credentials**," and click on "Create credentials" followed by "API key."

<div align="left"><figure><img src="https://1156155356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fpb8ANp0ZN6ZvWH8LcR5c%2Fuploads%2FBxHaIOx3vwFYlGiRpSiD%2Fgoogle-maps-3.png?alt=media&#x26;token=dfe6674b-bf2b-4f20-8170-1e2f8ec83d76" alt=""><figcaption></figcaption></figure></div>

**Step 7:** A dialog will confirm the creation of your API key. Copy it as indicated in **Step 8.** Your new API key will be listed under API keys on the Credentials page.

<div align="left"><figure><img src="https://1156155356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fpb8ANp0ZN6ZvWH8LcR5c%2Fuploads%2F3eqNNLmGfgnlQiPhzHbK%2Fgoogle-maps-4.png?alt=media&#x26;token=53b963e6-6c83-4cc6-bd81-4ec7164fa91f" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
Important: Always restrict your API key before deploying it in a production environment.
{% endhint %}

**Step 8:** Insert the API key in the Admin Panel under **Swap Manager -> Global Settings -> Google Maps**. Ensure to enable the Google Maps checkbox and click "Save."

### Modifying Application Restrictions:

Depending on your server/domain setup, the script might not accept **HTTP** referrer restrictions. Consider changing the application restrictions back to "None."

### Enabling Billing for Your Project:

Sometimes, certain features may stop functioning after adding the key. Depending on the associated Google account and project, you may need to enable billing.&#x20;

Learn more: [Billing](https://console.cloud.google.com/project/_/billing/enable) or Getting started with [Google Maps Platform](https://developers.google.com/maps/gmp-get-started)
