BooDoo

Maps and addresses

Connect Google Maps to your app

What is Google Maps?

Google Maps Platform lets your app show Google maps and places.

What it costs
Google needs a payment card on file, even to start. Each month a set amount of map use is free (10,000 map loads), and new Google Cloud accounts get a free trial credit.
Time needed
About 15 minutes. You need a Google account and a payment card.
If you skip it
Your app still works. Only the maps stay off until you connect it.

What you can build with Google Maps

How to get it, step by step

Create your key

  1. Open console.cloud.google.com and sign in. First time? Press Get Started, or press Create Project in the project list at the top.
  2. Turn on billing for the project and add your card when Google asks.
  3. Open the Maps JavaScript API page in the console and press Enable. Wait a few minutes.
  4. Go to Google Maps Platform, then Keys & Credentials, and choose your project.
  5. Press Create credentials, then API key. Under Select API restrictions, keep only Maps JavaScript API, then press Create.
  6. Copy the key. You can see it again later with Show key.

Lock the key to your website

  1. Open console.cloud.google.com/apis/credentials and press your key’s name.
  2. Under Application restrictions, choose Websites. Press Add, type your app’s address followed by /* (for example myshop.boodoo.ai/*), and press Done.
  3. Press Save.

Which value goes in which box

Maps API keyGOOGLE_MAPS_API_KEYKeep private
The key from the last step. An “API key” is a long code that lets your app use your account — like a password for apps.
Maps API key (for the web page)NEXT_PUBLIC_GOOGLE_MAPS_API_KEYNot secret
The same key — the same one goes in both boxes.

Watch out for

  • This key ends up visible in the web page, so lock it to your website (the second part) — otherwise anyone could use it on your card.
  • Without billing turned on, the map will not load.