Many people need to embed a Google Maps item on a WordPress site.It may be for a specific event, or to enhance an organization or business website.
Of course, there are many other possible reasons for doing so. Learn how to do it below.
Those are only the technical aspects. Deciding things like layout and what type of map to use is a different story.
Some may feel it is too difficult, so they take a screenshot and use the picture. However, this does not look very professional.
Google Maps offers many features that are free and easy to use and they will make a website look more polished.
This article shows how to do it and how to make use of the Google Maps API key. The use of API keys is a prerequisite now.
To attract people to a business or a location, providing the address is essential. With the address, people can find their way to the business.
But by adding a map, visitors will get a better idea of where to go. They can see where the street is, what other landmarks are nearby, and how to get there.
To help potential customers, taking a screenshot might do. It does give certain information.
But that is not as nice as using one of the free Google Maps features. These are some ways in which using a Google Map is superior:
To be able to use the Google Maps features, it is necessary to create a Google Cloud account.For users to access certain functions, the Cloud console needs to generate an API key.
In this way, Google knows when the website with the map is used and which billing profile it’s connected to.
The API key requirement became effective as of June 11, 2018.
This might explain why a Google Maps that worked in the past, now no longer works. Linking to a Google Cloud account may solve the problem.
Although the Cloud account links to billing information details, the use of Google Maps is free for most users. This is according to the Google Maps API pricing site.
It appears that no other changes occurred. So, to continue using these features, check the following:
What is an API key? It is a unique identifier that links a request with a project.
Its main purpose is identification and billing. There should be at least one API connected with any one project.
The first step is to enable the relevant API Libraries. There are many different Google Maps APIs.
These are the most important ones:
To enable them, go to the Google Maps API Libraries page. There are two libraries: ones that are currently enabled and those that are disabled.
At the top left corner select the relevant project. Now, enable all the necessary libraries.
Select them and click the Enable button. While here, disable the libraries that are not needed.
Choosing the right libraries depends on the features used in the Events Manager. Here is a list of the libraries that may be necessary:
The instructions on Google’s own website are not very clear. They are especially confusing for someone without developing skills.
Here is a step-by-step guide that makes the process clearer:
Now it is time to turn to the WordPress Dashboard.
To avoid the API key showing in plain text on the website, follow the next steps.These steps are important because otherwise, people can copy the key.
This would allow them to use it for their website and consume the free uses.
Click the name of the API key to add restrictions. The easiest way to fix the issue is by adding an HTTP referrer, like https://yourdomain.com/*.
In this way, calls can only be made on this assigned website. The format of the restriction is very specific, so please use the format above.
Finally, click the Save button to keep the restrictions.
As mentioned, Google uses API keysfor billing purposes. So, they have set a limit on the number of free API requests that it can authorize per day.
This is important to monitor, especially for busy websites. There are ways to limit the number of API requests.
One way is to restrict the API key’s functionality and limit their use to white-listed domain names.
The Google website has some security tips to prevent unauthorized use of API keys. Please have a look at them if this is necessary.
We also wrote about a few related subjects like how to measure distance on Google Maps, how to drop a pin in Google Maps, what is a vector map, interactive maps, the choropleth map and how to make one, thematic map examples, how to find elevation on Google Maps and statistical maps.
I take it you like maps as well so make sure to check out MapSVG, a great WordPress maps plugin you should check out.