Step 5
Map Setup
Set Your Google Maps API Key
- Set the Google Maps API key. This key is essential without it, your app will not work.
In the following steps, we will request this key.
-
Go to the Google Cloud Console and create an account.
-
Then, go to the Google Cloud Console Start
-
Create a new Google Cloud project and Select a project
- Enter a unique project name and click Create
- Set up your payment method. If you want to learn more about Google Maps API costs, read the following page: Google Maps Pricing Table
- Link your billing account to your project and enter your credit card information.
- Now go to APIs & Services
- Search for maps
- Enable either Maps SDK for iOS or Maps SDK for Android, depending on which platform you will release your app on.
- Go back to API & Services
- Select the APIs you need.
- Go to Keys & Credentials
- Click on Create Credentials and select API Key.
- Select your newly created API key.
- Restrict your API key using the options shown in the image. As the last step, copy your API key and click Save. Once you have created the API key, insert it in Step 1.
- (Optional): Click on Quotas. Here, you can limit requests to your Google Maps API to avoid unexpected costs.
Set your initial spawn position
- As a final step, move the map to set your initial spawn point. This point will always be navigated to when the app opens.