# Google Maps API

### **Step 1: Set Up a Google Cloud Project**

1. **Go to the Google Cloud Console**:\
   [Google Cloud Console](https://console.cloud.google.com/).
2. **Create a new project**:
   * Click the **Select a project** dropdown at the top.
   * Click **New Project**.
   * Provide a **Project Name**, choose an organization (if applicable), and click **Create**.
   * Once the project is created, select it from the project dropdown.

***

### **Step 2: Enable Google Maps API Services**

1. **Enable APIs**:
   * In the **Google Cloud Console**, click the **Navigation Menu** (three horizontal lines in the top left).
   * Go to **APIs & Services** > **Library**.
   * Search for **Maps SDK for Android** (for Android apps) and **Maps JavaScript API** (for Web apps).
   * Click on each API and then click **Enable** to activate it for your project.

***

### **Step 3: Generate API Key**

1. **Create API key**:
   * After enabling the APIs, go to **APIs & Services** > **Credentials**.
   * Click **+ Create Credentials** > **API Key**.
   * Google will generate an API key for you.
2. **Restrict API Key (Recommended)**:
   * After generating the key, click on the API key to edit.
   * Under **API restrictions**, select the **Maps SDK for Android** (for Android) or **Maps JavaScript API** (for Web).
   * Under **Application restrictions**, select the relevant option:
     * **For Android**: Select **Android apps** and provide the SHA-1 fingerprint and package name.
     * **For Web**: Select **HTTP referrers (websites)** and enter the domain(s) where the API key will be used.
   * Click **Save**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://infouslabs.gitbook.io/travix/google-maps-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
