Table of Contents

How to enable Google Maps API Key

Source : Support Need4Viz — KB #80 — Category : Online maps

Symptom

Environment

Resolution

Usage of Google maps is allowed only within a Google API Key you have to generate for your own company.

The steps for generation of the Key can be found here ( you can dismiss the step “Add the API key to your request” ):

https://developers.google.com/maps/documentation/javascript/get-api-key

After the steps “Create API keys” and “Restrict API keys”, you can retrieve your key and follow the below steps to activate your N4V Google maps components :

  1. Edit the Need4Viz\nodejs\node_modules\custom_element\ce_libs\config.js file
  2. Set your google key in the “ GoogleKey ” parameter (put your key between quotes): [image: image]
  3. Save the config.js file
  4. Open a PowerShell window and launch the command “ pm2 start all ”
  5. Try your N4V Google maps component in Webi

You can get information about the pricing of Google maps usage here : https://mapsplatform.google.com/pricing/

Possible issues

If you get an error about the new created Google API Key, find below the Common Causes and Solutions: