You have created a website and you want to display a Google Map on a web page? To do so you need to specify a Google Maps API key. In this website creation tutorial we will see how to get a Google Maps API key and use it in your manager.
To get a Google Maps API key, you first need a Gmail account. If you don't have one, you need to create one first.
If this is your first time on the console, you will automatically create a new project named "My Project".
You just need to tick 2 boxes:
say whether or not you want to receive Google APIs news
accept the terms of service.
Then click Agree and continue.
2. Creating the key
Again there are 2 fields to fill in:
You will first need to name the key (you can leave the default name "Browser key 1")
In the field Accept requests from these HTTP referrers: enter your domain name without "www", followed by a slash (/) and adding an asterisk before and after: for example *.mydomain.com/*
Then click Create
3. Your key has been created
A new window shows your Google Maps API key; copy it so you can add it to your emyspot manager.
Once the window is closed, you can also find it in the credentials section of the API management.
Specify it in your manager
Go to Settings > Global settings > API Google. Copy and paste the key obtained from the Google Developers Console, then save.
To display Google Maps easily on your website, see our tutorial dedicated to the Google Maps widget.
Optimise how the key works
Some uses of this key, and of maps, may require further configuration of the API key. To do this, go back to the Google Developers Console (you must use the same Google account that was used to create the API key). The point here is to enable two API libraries: Google Maps GeocodingAPI and Google Places API Web Service.
Once on the Google Developers Console, go to the library of APIs then click one of the names above. All that is left is to enable it at the top of the page. Follow the same procedure for the second name.
Enabling these two libraries avoids certain problems that can occur on some Google Maps added to your agenda, for example.