Skip to content
Benny Born edited this page Jun 19, 2024 · 6 revisions

To use StoreLocator 3 you'll need a Google Account and register some API keys. The Google Maps API is used by StoreLocator to provide suggestions while typing into the search field and to obtain the geo coordinates for your stores.

Create a project

  1. Navigate to the Google API Console
  2. In the upper bar click on Project and choose Create project
  3. The Project name is not relevant, you can name it however you want
  4. Agree to the Terms of Service and click Create

Create API Keys

  1. On the left side click onto Credentials
  2. In the upcoming window click on the button Create credentials and choose API key
  3. The key shown will be used as our Server-Key. Go ahead and copy it into the Contao settings
  4. Click on RESTRICT KEY
  5. Name it "Server Key"
  6. Since the Server-Key is kept secret all the time we do not necessarily need any restriction but if you know your servers IP it won't hurt to select IP addresses and the Key restriction settings
  7. Click on Save
  8. Repeat steps 1-5 but this time step 3 will be our Browser-Key in Contao
  9. Name it "Browser Key"
  10. In Key restriction choose HTTP referrers
  11. Enter the domain of your website*

If your domain is called www.mustermann.de you should set the HTTP referrer to *.mustermann.de/*

  1. Click on Save

Enable necessary API´s

The following steps are needed to enable all API´s StoreLocator needs in order to work.

  1. On the left side click onto Library
  2. In the search field enter the term Google Places API Web Service
  3. Click on the first result
  4. In the upper bar click on the button labeled ENABLE
  5. Repeat steps 1-4 for the terms Google Maps JavaScript API, Google Maps Embed API, Google Maps Geocoding API and Google Static Maps API

Allow unsigned usage of Static Map API

  1. On the left side click onto Dashboard
  2. In the listing of active API's click on the entry Maps Static API
  3. Choose the tab labeled URL signing secret
  4. Click on the button Allow unsigned usage and confirm the upcoming dialogue