MapSVG tutorial

How to create Google API keys for Maps JavaScript API and Geocoding API

MapSVG needs 2 Google API keys: Maps Javascript API key & Geocoding API key.

1. Maps Javascript API key is required for:

  • Enabling Google Maps
  • Downloading a calibrated SVG file with a Google Map screenshot

2. Geocoding API key is required for:

  • Adding markers by entering an address
  • Importing locations (as lat/lon or address) from a CSV file
  • Searching for a location on Google Map

Since summer 2018 Google requires providing billing details in order to use their API. There is a free quota of 28,000 Google Map views per month and 2,500 Geocoding API requests per day. You won't be charged if you don't exceed the limit.

Sign in to Google Cloud Console and provide your billing details: https://console.cloud.google.com

Then click on top-left navigational menu button, go to Menu > API & Services > Credentials

Click on Create credentials > API key

Click on Restrict key

Change the name of the key to "Maps JavaScript API key".
Select Application Restrictions > HTTP referrers and enter 2 URLs as follows:
https://*.yourwebsite.com/*
https://yourwebsite.com/*
If you don't have SSL then begin the URL with http:// and not https://

Now go back and create one more key, name it "Geocoding API key". This key should be restricted by IP of your website. You can find IP of your website here: http://www.ipvoid.com/find-website-ip/

Now you need to enable Maps JavaScript API & Geocoding API for you account. Go to Menu > API & Services > Library

Enter "Geocoding" in the search bar and click on Geocoding API block:

Click on "Enable" button if API is not enabled yet:

Go back and enter "Maps Javascript" in the search bar, and click on Maps JavaScript API block. Enable it too:

Go to MapSVG, click on Google API button and add both keys: