Technical Blog Post
How to configure Google Maps API using only API Key without Client ID on IBM Maximo Asset Management v7.6.0
When decide and planning to migrate to use only API Key instead of Client ID for authenticating requests Google Maps in Maximo 7.6.0 environment.
As we may know that "Client ID" (all client IDs begin with a gme- prefix) was required when using Google Maps provider in Maximo 7.6.0.
Before begin, first is Maximo 7.6.0 should already configure maps in Map Manager application to enabling maps as per in this guide
And already obtained the appropriate API Key from Google Maps Platform the map provider that you select.
Remember to ensure that network firewall accepts outgoing connections from client browser to Google links on port 443 used when map is loaded and displayed into client browser:
Actually, there are two warning regarding
RetiredVersion and SensorNotRequired when using Google Maps provider in Maximo 7.6.0:
Current URL was generated every time sent authenticating requests to Google Maps:
Parameter “&v=” (API version as set in mxe.map.googleMapsAPIVersion), “&sensor=true” (no longer required, and recommend to remove), and “&client=” (to be changed to &key=)
Now, let's follow these step to fixed and to use only API Key for authenticate requests:
2. Add/Change the value on MAPMANAGER.GMAPSLICENSE text-labeled "Google client ID" field in Map Manager application with YOUR_GOOGLE_MAPS_API_KEY.
3. The final step is to edit dojo (.js) file mxmap.js file under the following path
- Backup file mxmap.js (copy/rename put into your backup folder)
- Change string "&client=" to "&key="
- Remove string &sensor=true
- Save file mxmap.js
There are NO DOWN-RESTART/ADMIN-MODE required. Since there's no Database Structure or Java-class was changed.
(Info: Restarting websphere/weblogic application server is required if you plan re-build MAXIMO.ear and re-deploy to application server when applying the step above)
After finishing step above, the request parameter URL was changed, then the map displayed, and looks good.
(* Remember to clear client browser cache e.g. Mozilla FireFox or Google Chrome)
* Google Maps API version. The value must correspond with a valid Google version.
** All step above is for you to decide and plan to use only API Key for authenticating requests instead of using Client IDs.
*** Restrict the API key and Registering authorized URLs under Google Cloud Platform Console
**** The latest version of IBM Maximo 7.6.1, now clients are able to choose either using API Key or Client ID for Google Maps provider.