All new created websites are required by Google to use an API key to access the Google Maps API services.

Billing

To use the Maps JavaScript API, you must enable billing. You can enable billing separately (see Usage and Billing) or when you get your API key.

Why do I need to generate API key?

If you’ve used Setup Wizard with WorkScout and imported demo content, you’ll see that your maps are probably working. This is because Setup Wizard installs you our public API key that is shared between all other WorkScout installation where users just installed it or haven’t configured own API yet. Unfortunately there are limits on API calls and if they are exceeded, the maps functionality stops working. That’s why you need your own API key.

How to generate API key?

To generate your API key, you need to  access the Google Developer console. In the Google Developers Console, follow these steps:


Create Project


Generate API Key

You can use Key restriction to restrict your API key to only your website. Make sure to add it as

https://yourpage.com/*

this way all subdomains and subpages will be accepted. Contrary to what Google suggest, you need to use http:// or https:// in front of your domain, it will not work with just *. It sometimes takes couple minutes to have your site accepted.

After adding it, click Create.

Sometimes you’ll see errors in Chrome Console that you’re website is not authorized to use that API. In that case, set the Key Restriction to “None


Copy API Key

If you haven’t set key restriction, copy the API key and paste it in Appearance -> Customize -> Maps -> API key and in Job Listings -> Settings -> Google Maps API Key

However, if you choosed to have API restriction, you need to generate another API key, without the restriction, and you need to put this one in the¬†Job Listings -> Settings -> Google Maps API Key.¬†This API key is used for server-side geocoding and it won’t work with domain restriction. It’s not shared anywhere publicly so don’t worry that someone else is going to use it. Only the Key set in¬†Appearance -> Customize -> Maps -> API key¬†is visible on front-end


Enable APIs

Go to Library¬†-> Maps¬†and click¬†¬†Google Maps JavaScript API –¬†¬†Enable the service.

Other APIs you need to enable to get full functionality of WorkScout are marked on this screenshot


Adding API Key

  1. Job Listings ‚Üí Settings ‚Üí Google Maps API Key (key here is required for geocoding in job submission form)
  2. WorkSCout Core ‚Üí Settings ‚Üí Google Maps API Key