At DataMade, we use several Google APIs to support our maps. Google continues to have the most robust Geocoding service and we often times use the Google Maps Javascript API for their map tiles as well.
To keep accurate accounting of API usage per website, we create a separate Google API key for each project.
DataMade staff have access to these keys here: https://console.developers.google.com/apis/credentials?folder=&organizationId=&project=adroit-hall-205721
-
Navigate to the Google API Console credentials page and click 'Create credentials'.
-
Edit the API key and restrict access to HTTP Referrers. Add the list of allowed domains to the list. For local development, make sure to inclued
localhost
and127.0.0.1
. -
In your app, add the API key any place the
maps.google.com/maps/api/js
script tag is called.
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false&libraries=places&key=YOUR_KEY_HERE"></script>
- Deploy the changes and test that they work.