Activate Google maps distance calculation
You set up Google Maps API key so that you can use the Google route plug-in to calculate the distance for mileage declarations, employed and changes of address.
You also indicate in the Create declaration profile that you want to create a declaration with distance calculation.
Using the API Key
You need to set up a Google Maps Api key in Profit (t.b.v. InSite, OutSite and/or Pocket) for the Google Maps plug-ins.
Note:
After the free trial period, you still need to 'upgrade' or 'activate' the billing account after you have set it up. If you don't do this, the Google Route plug-in will no longer work after the trial period until you have completed the upgrade or 'activated' the billing account.
More information: https://cloud.google.com/free/docs/gcp-free-tier#how-to-upgrade
Enable 'billing' in the Google account under which the api key was requested. This will require the entry of a credit card. You can check directly if you already have a credit card linked to the Google account via https://console.cloud.google.com/billing.
After linking a credit card, you get a monthly "credit" for a large number of requests. You don't start paying until the credit runs out. See Pricing for Maps, Routes and Places for more information about the number of requests you get by default every month.
To configure Google Site Search:
- Click on: API console (after the Google Maps API key field).
The Google website appears.
- Log on to the Google website.
- Add a project, this is mandatory for proper operation! If you already have a project, you (probably) don't need to do this.
- Open the menu en click on API's and services.

- Click on 'Enable API'S and services'.
- At the top, the correct project should be selected.

- Search and enable the following API's:
- Google Static Maps API
- Google Maps Directions API
- Go to: Credentials.
Note:
Remove possible key restrictions that have been applied to the API key used for AFAS Pocket. If you want to use key restrictions for InSite or OutSite, you should create separate API keys.
- Click on: Create logins.

- Click on: 'API Key'.
- The API key appears in a separate window, copy this to the clip board.
- Return to Profit.
- Pas the code in the Google Maps Api key field.
- Click on: OK.
Adjust creating declaration profile:
- Go to: General / In & OutSite / Profile.
- Open the properties of the profile Aanmaken declaratie.
- Select the Declaration with distance calculation check box.
- Click on: OK.
You can now add the Google route plug-in.
Error message:
The following error message may be displayed: The specified Google API key is invalid or may not be used on this site. You can solve this by activating Google Maps JavaScript API v3 service:
