> For the complete documentation index, see [llms.txt](https://docs.dingdoong.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dingdoong.io/how-to-enable-gg-maps-api-key/creating-a-google-maps-api-key.md).

# Creating a Google Maps API key

{% hint style="success" %}
**Why do you need to create a Google Maps API key?**

* You want to show a map for PICKUP LOCATION
* You want to validate **local delivery by address with maximum distance** from your store&#x20;
  {% endhint %}

{% hint style="warning" %}
You must have an active GG Maps API key to activate feature for Pickup Map and Local delivery distance restriction.
{% endhint %}

## 1. New Google Cloud users

To create a Google Maps API key, follow:

#### Step 1.  Visit [Google Maps Platform](https://mapsplatform.google.com/) page and click Get started&#x20;

<figure><img src="/files/waQS61dkGw7fXLJFyUnG" alt=""><figcaption></figcaption></figure>

#### Step 2. Verify your Account Information and fill in Payment details to add your business

<figure><img src="/files/vuu6o61YLcd7q5aVy6z5" alt=""><figcaption></figcaption></figure>

#### Step 3. Copy the API Key and check Enable all

<figure><img src="/files/ZUZJONr2YteuzAV190Po" alt=""><figcaption></figcaption></figure>

#### Step 4. Go to Google Maps Platform and choose "Maybe later" to not add a restriction

<figure><img src="/files/TzUeByy78xnthy4efSkC" alt=""><figcaption></figcaption></figure>

## 2. Exisiting Google Cloud User

#### Step 1.  Visit [Google Maps Platform](https://mapsplatform.google.com/) page and click Get started&#x20;

<figure><img src="/files/83qKMgRNSuqhx7N7rILK" alt=""><figcaption></figcaption></figure>

#### Step 2.  Click My First Project and choose New Project

<figure><img src="/files/Q1wkMh4rU9LkyBCsvSL2" alt=""><figcaption></figcaption></figure>

#### Step 3. Add a Project Name and Billing account and click Create.

<figure><img src="/files/h64Ma0Fm2MzPY0NeBVaq" alt=""><figcaption></figcaption></figure>

#### Step 4. Click Select project and then click Keys & Credentials

<figure><img src="/files/Y69cudyyQKgrgz7u6KI0" alt=""><figcaption></figcaption></figure>

#### Step 5.  Copy the API Key and check Enable all

<figure><img src="/files/Iy6Ltyl6nHIUDabPCAye" alt=""><figcaption></figcaption></figure>

#### Step 6. Go to Google Maps Platform and choose "Maybe later" to not add a restriction

<figure><img src="/files/PInVw4NZANFDKH8e0Rw2" alt=""><figcaption></figcaption></figure>

## 3. Use case

After having a valid API key, you can use this key to activate feature for Store pickup location and Delivery distance restriction.

{% hint style="success" %}
Ensure that you have enabled these API: [Routes API ](https://console.cloud.google.com/apis/library/routes.googleapis.com?inv=1\&invt=Abs26Q\&project=daring-solstice-454704-f1)and [Maps JavaScript API](https://console.cloud.google.com/apis/library/maps-backend.googleapis.com?inv=1\&invt=Abs26Q\&project=daring-solstice-454704-f1) and [Places API](https://console.cloud.google.com/apis/library/places.googleapis.com?inv=1\&invt=AbtCuA\&project=maps-projects-454903\&pli=1)
{% endhint %}

### 3.1. Store Pickup Map

#### Step 1.  Navigate to General Settings and click Advanced Settings, then choose Enable Google Map

<figure><img src="/files/hc9kpQqF28Z6PNkWsF3T" alt=""><figcaption></figcaption></figure>

#### Step 2. Paste your API key&#x20;

<figure><img src="/files/kfYtKyvAw3zofS5njsrf" alt=""><figcaption></figcaption></figure>

#### Step 3. If you have added an API key successfully, it will appear here

<figure><img src="/files/VqUbV8bSxHUgZ4MLujVf" alt=""><figcaption></figcaption></figure>

As a result, your storefront will look like this:

<figure><img src="/files/gPaQichk4PS7k4E4eHCS" alt=""><figcaption></figcaption></figure>

### 3.2. Local delivery distance restriction

#### Step 1.  Navigate to General Settings and click Advanced Settings, then choose Local Delivery Validation

<figure><img src="/files/4dBG3v3tzgAkG7uq6LPN" alt=""><figcaption></figcaption></figure>

#### Step 2.  Paste your API Key

<figure><img src="/files/9boQHGqyq6M6D3k7Ptg6" alt=""><figcaption></figcaption></figure>

#### Step 3. After successfully adding API key, choose the unit you want to measure distance in

<figure><img src="/files/fHYkhGKG9qfGAcuvB2N6" alt=""><figcaption></figcaption></figure>

#### Step 4. Go to Location and edit Delivery settings to choose maximum distance you want to set

<figure><img src="/files/py20N914wNEQeVNvSNYp" alt=""><figcaption></figcaption></figure>

In the storefront, your customers will need to enter their address in the widget to check if delivery is available

<figure><img src="/files/4nlqauB7cDiZUa4TYCh8" alt=""><figcaption></figcaption></figure>

If the address that the customer entered in the widget falls within the radius you specified in your delivery condition settings, he will be able to proceed

<figure><img src="/files/CnjsqU8U5hmYbmG47ABI" alt=""><figcaption></figcaption></figure>

If the address that the customer entered in the widget is out of the radius you specified in your delivery condition settings, he will be unable to proceed further

<figure><img src="/files/N2m9wEOoEWsERGMUEFBQ" alt=""><figcaption></figcaption></figure>
