Skip to content

Google Maps API Key

Justin J. Novack edited this page Jul 27, 2016 · 1 revision

##How to get your own Google Maps key and use it for this project This project uses Google Maps. There's one map coupled with the project, but as it gets more popular we'll definitely hit the rate-limit making the map unusable.

Often this error is encounterd

Map Error

How to fix this

  1. Go to Google API Console
  2. If it's the first time, click 'Next' on a bunch of pop-ups or just click somewhere where the pop-ups aren't
  3. Create Credentials

Credentials

  • Select a project: Create a project
  • Project name: Anything you want
  • Yes/No for email
  • Yes to agree to ToS
  • Click create.
  1. Get your API Key

    • Click on Credentials again
    • Click Create --> API
    • Choose 'Browser Key'
    • Click 'Create' and then copy the API Key somewhere

    API Browser Key

    API Browser Key

  2. Enable two Google Maps APIs

    • Google Maps Javascript API - Enables Displaying of Map
      • Click on 'Library'
      • Click on Google Maps Javascript API
      • Click 'ENABLE'
    • Google Places API Web Service - Enables Location Searching
      • Click on 'Library'
      • Type 'Places' into the search box ' Search all 100+ APIs'
      • Choose Google Places API Web Service
      • Click 'ENABLE'

Configuration of API Key

  1. Navigate to your pokemon map directory, and inside the config folder you will find credentials.json.

Map Directory

  1. Add your previously created Google API key in this file, save it, and re-run the server! it should be working now! If you see an error, make sure you actually enabled the Javascript API in Step 5.

credentials.json