Display Asset Locations on a Map

While designing a page, you can use the Google Maps widget to display the locations of assets on a map. To do so, you require the API key generated by Google. This topic describes how to access the key and use it in the application that you want to create.

Procedure

  1. Access https://cloud.google.com/maps-platform/, and follow the on-screen instructions to generate the API key.
    The API key is generated.
    Note:
    Ensure that the following APIs are enabled for the key:
    • The Geocoding API
    • The Maps JavaScript API
  2. Modify the Config.js file (C:\Program Files\GE\Operations Hub\iqp-endapp\config) to enter the code for google API key.
  3. Open the App.js file (C:\Program Files\GE\Operations Hub\iqp-endapp\public\scripts) in Notepad ++ and search for googleapi to enter the key.
  4. Enter map API key information as follows: For example, if the Google API version is 3.35, then enter v=3.35& before key="+i+".
  5. Save and close the file.
  6. Restart the Operations Hub IQP Tomcat Web Server - Service.
    The Google Map widget is now available for use in the application. Asset locations are now displayed on a map.