Next in this lesson on Integrating Your Website with Google I want to put a map on the About page. I want to put a map down here so that people can find us. And in order for me to do that I need to install a plugin. And that plugin is called Google Map Embed.
Add Plugin Google Map Embed
There are lots of plugins for you to choose from but this is the one we want, Google Map Embed. There are plugins with similar names. So, we’ll activate it. Yes, that’s it.
Get API Key
If you are still logged in to your Google account, you can click that “get free API key” and it takes you over to Google APIs. Here we’ll create a project. Okay it’s enabling the API. So the name is going to be “Tutorial API” and then hit “create”.
Here’s my API key. So I can come over here and put my API key there and hit save. Robin asks “if you’ve already got an API key do you need another one”. The answer is no, actually. I just showed you creating an API key but you noticed I had one in the drop down list already and that’s the one that I use for everything.
So, no you don’t need a new API key for every application unless you’ve restricted that key to a specific website which I didn’t show you how to do but is possible. If you didn’t do that then you can use your API key on any site you are building.
Create the Map
Now that I’ve got that done I can create a new map. And all you do here is just type in the address that you want to show on the map. That looks about right.
We are going to have the width be 100% and the height be 300 pixels. That’s probably just fine too. Road map is fine. We’re going to show the address in with the little marker there and we’re going to hit save.
Add Shortcode to the Page
Here is another shortcode. That shortcode can be copied and then pasted. So, we’ll copy that and come back over to this page here and edit the page. And then I think I’m just going to come right here and paste that embed code. Hit update.
View the Map on About Page
Let’s view the page. And there it is, the map. So, it’s very simple and straightforward to add your own google map. And unless you have something special that you want done, there is no need to pay for a premium google map using this plugin. This will do the whole job for you.