Skip to content Skip to main navigation Skip to footer

Generating Google Maps API Key and Map ID

This tutorial will guide you through the process of generating a Google Maps API key with specific APIs enabled and domain restrictions. Additionally, you will create a Map ID in the Google Cloud Console. This is necessary for the proper operation of the Chauffeur Taxi Booking System, and generating it will take you about 10 minutes.

Google Maps APIs come with a free monthly usage limit, which covers most standard use cases. If your usage exceeds this limit, additional charges may apply. You can review the latest pricing details on the Google Maps Platform Pricing Page. To keep track of your usage, you can set up billing alerts in the Google Cloud Console, ensuring you stay within your budget and receive notifications when approaching the free tier limits.

Important!

Never reveal your Google Maps API key and limit its use to the domain to avoid additional operational costs. More on domain restriction later in this guide.

Create a Google Cloud Project

  1. Go to the Google Cloud Console at https://console.cloud.google.com/ (if you are not logged in, Google will prompt you to log in).
  2. Click the ‘Select a project’ dropdown at the top – See screenshot.
  3. Click ‘New Project’See screenshot.
  4. Enter a ‘Project Name’.
  5. Click ‘Create’See screenshot.

Enable the Required APIs

  1. In the Google Cloud Console, go to ‘APIs & Services’ -> ‘Library’See screenshot, See screenshot.
  2. Use the search bar to find and enable the following APIs:
  3. Click on each API and then click ‘Enable’.
  4. After enabling the first API, Google will prompt you to create a Billing Account if one has not been set up.
    • Choose a ‘Billing Account Name’ and select the ‘Currency’.
    • In the next step, select a ‘Billing Profile’ and ‘Payment Method’ (e.g., a card linked to your account).
    • Google will attempt to verify your account and will charge 0.00 for verification.

Create an API Key

  1. Navigate to ‘APIs & Services’ -> ‘Credentials’.
  2. Click ‘Create Credentials’ and select ‘API Key’See screenshot.
  3. Your new API key will be generated. Copy it for later use – See screenshot.

Restrict the API Key

  1. In the ‘Credentials’ section, locate your newly created API key.
  2. Click on the key name to edit it – See screenshot.
  3. Under ‘Application restrictions’, select ‘Websites’, and click ‘Add’.
  4. In the ‘Website’ field, add your domain(s), e.g.,:
    • https://yourdomain.com/*
    • https://sub.yourdomain.com/*
  5. Under ‘API restrictions’, select ‘Restrict key’.
  6. From the dropdown, check the following APIs:
    • Geocoding API
    • Maps JavaScript API
    • Places API
    • Routes API
  7. Click ‘Save’.

Create a Map ID

  1. Navigate to ‘Google Maps Platform’ -> ‘Map Management’See screenshot.
  2. Click ‘Create Map ID’See screenshot.
  3. Enter a ‘Name’ for the Map ID.
  4. Select the ‘Map Type:’ JavaScript, Raster
  5. Click ‘Save’.
  6. Your Map ID will be generated. Copy it for later use – See screenshot.

Integrating the API Key with Chauffeur Taxi Booking Plugin

  1. Navigate to ‘Settings’ -> ‘Chauffeur Booking System’ in your WordPress dashboard.
  2. Go to the ‘General’ -> ‘Google Maps’ tab.
  3. Paste your Google Maps API Key into the ‘Google Maps API Key’ field.
  4. Paste your Map ID into the ‘Google Maps ID’ field.
  5. Click ‘Save Changes’ button to apply the settings.

Summary

Document version: 1.1
Last updated: March 10, 2025
Plugin version: 8.4+

Was This Article Helpful?

Related Articles