How to generate a Google Map API key

To use google maps in MyListing, first thing you need to do is generate a Google map API key. If you install the demo content, a sample API key will be included however that is only for demo purposes. You will need to create your own API key and add it in Theme options > general.

Follow these steps to get an API key:

  1. Go to the Google Cloud Platform Console.
  2. Create or select a project.
  3. Click Continue to enable the API and any related services.
    You will need to Enable Geocoding API, Maps JavaScript API, Places API
    You can find them here
  4. On the Credentials page, get an API key.
  5. From the dialog displaying the API key, select Restrict key to set a browser restriction on the API key.
  6. In the Key restriction section, select HTTP referrers (web sites), then follow the on-screen instructions to set referrers.
  7. Copy the API key and add it in wp-admin > Theme tools > theme options > general

I have an API key but it does not seem to be working

If the API key is not properly configured, you may notice maps not showing up, location auto-suggest not  working, listings not showing up in explore page map among other things.
Good thing is, it’s very easy to find the cause. You can simply right click on the page > choose “Inspect element” > choose “Console”, and there you will see a warning related to maps and a link to google maps documentation related to that warning.

If you still have problems with maps after reading this tutorial, then Ask a question here and provide your site URL so we can check

Leave A Comment?

You must be logged in to post a comment.