# Google Maps

Google Maps is integrated into multiple parts of your Meraki website to provide location-based services.

***

### Where Google Maps is Used

* **Store Selection**
  * When a customer searches for a location, the system checks if a store is available within the selected radius and assigns it.
  * All available stores are also displayed on a map on the **Store Locator** page.
* **Adding or Updating Customer Address**
  * Customers can search for their address using **autocomplete**.
  * Alternatively, they can drag a pin on the map to select their exact location.
* **Order Success Page**
  * A **static map** is displayed on the order confirmation page.
  * This uses UrbanPiper’s internal Maps API key (not the merchant’s key).

***

### Prerequisites for Maps to Work

If you are using **your own Google Maps API key**, ensure the following APIs are enabled in your **Google Cloud Platform (GCP) project**:

* ✅ **Maps JavaScript API**
* ✅ **Places API**
* ✅ **Geocoding API**

> ⚠️ Without these APIs enabled, Maps-related functions on your website will not work.

***

### Troubleshooting Maps Issues

If Maps aren’t working on your website:

#### Step 1: Inspect the Website

* Go to your website’s Menu page.
* Right-click → **Inspect**.
* Open the **Network** tab.
* Type `maps` in the filter bar to view Maps-related requests.

#### Step 2: Test Store Selector

* Open the **Fulfilment Selector** (store selection popup).
* Search for a location.

#### Step 3: Check for Errors

Look at the network logs and identify common issues:

* **Service not enabled** → Errors mentioning “places not enabled” or “geocode not enabled.”
* **Referrer restrictions** → Errors mentioning “referrer” (your domain is missing in the GCP key’s allowed list).
* **Billing not enabled** → Errors mentioning “billing” (your GCP project billing setup is incomplete).

📌 Reference: [Google Maps API error messages](https://developers.google.com/maps/documentation/javascript/error-messages#api-not-activated-map-error)

***
