{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":42643,"path":"platform-user-interface/set-up-google-maps-api.md","title":"Set up Google Maps API","bundle":null,"doc_type":null,"release":"australia","body":"\n# Set up Google Maps API\n\nYou enable the geolocation feature using the appropriate entries from a Google Maps API for Business license, or a Google Maps JavaScript API Key.\n\n## Before you begin\n\nRole required: admin\n\n## About this task\n\nYou can generate maps using basic JavaScript, and they are flexible enough to display even the most complicated of queries. These maps use standard Google Maps API for Business or Google Maps JavaScript API Key mapping features, including various link types to records in your instance. Use of this feature requires installation of the Google Maps plugin.\n\n**Important:** Starting May 2026, Google is deprecating the use of Client ID for authenticating requests to Google Maps. From this date onward, API keys will be the only supported authentication method. If your application continues to use client-id \\(for example, via the **google.maps.method property**\\), Google Maps requests will fail. For more information, see [Client ID Migration Guide](https://developers.google.com/maps/premium/migrate-client-id).\n\nUpdate your configuration to authenticate using an API key only \\(that is, set **google.maps.method** to `key`\\). Refer to the descriptions of **google.maps.key** and **google.maps.key.geocoding** properties for more information on API key–based authentication.\n\n## Procedure\n\n1.  Google Maps APIs for Business licenses are no longer available from Google, so, depending on whether have an existing license, use one of the following procedures.\n\n    **Note:** You are required to use your own Google Maps JavaScript API Key from Google and not use any ServiceNow AI Platform® generated key.\n\n<table id=\"choicetable_okq_vnj_smb\"><thead><tr><th align=\"left\" id=\"d55385e112\">\n\nExisting Google Maps API for Business license available?\n\n</th><th align=\"left\" id=\"d55385e118\">\n\nTasks\n\n</th></tr></thead><tbody><tr><td id=\"d55385e124\">\n\n**Existing license available**\n\n</td><td>\n\n1.  In the **System Properties** &gt; **Google Maps** property form:\n    -   In the **google.maps.client** field,enter the Client ID for your organization. This ID is from Google and starts with `gme-`, such as `gme-mycompanyname`.\n    -   In the **google.maps.client.key** field, enter the private key for Google Maps API for Business. An example of an encoded key is `vNIXE0xscrmjlyV-12Nj_BvUPaw=`. The ServiceNow AI Platform® requires this key to retrieve accurate driving time estimates from Google for some Geolocation features.\n    -   Fill out the remaining values on the form.\n2.  Configure your maps using the property definitions from the table.\n **Important:**\n\nThe Google Maps Client ID–based configuration is being deprecated. Client ID authentication will not be supported starting May 2026, and configurations relying on it will no longer work.\n\n</td></tr><tr><td id=\"d55385e198\">\n\n**No license available**\n\n</td><td>\n\n1.  Obtain a Google Maps JavaScript API Key from Google.\n2.  In the **System Properties** &gt; **Google Maps** property form, enter the API key into the **google.maps.key** field.\n\nGeolocation in the ServiceNow AI Platform® uses the API Key, which Google Maps also uses for Geolocation and map view billings.\n\n3.  Fill out the remaining values on the form.\n4.  Configure your maps using the property definitions from the table.\n\n\n</td></tr></tbody>\n</table>    To learn more about Google Maps API for Business, and Google Maps JavaScript API Key, see [https://developers.google.com/maps/gmp-get-started](https://developers.google.com/maps/gmp-get-started).\n\n2.  After you complete and save the configuration, create Map pages, or use the default pages included with the plugin.\n\n    Map pages define what data appears on the map, and the appearance of the links. For a tutorial on how to view all of the markers that link to your records, see the [Display Map Markers on Google Maps](https://community.servicenow.com/community?id=community_blog&sys_id=909ceae1dbd0dbc01dcaf3231f96192b) blog post on the ServiceNow Community.\n\n<table id=\"table_edd_4zf_vt\"><thead><tr><th>\n\nProperty\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ngoogle.maps.method\n\n</td><td>\n\nDefines which method of authentication should be used for Google Maps.-   Type: string\n-   Default value: key\n-   Location: **System Properties** &gt; **Google Maps**\n\n\n</td></tr><tr><td>\n\ngoogle.maps.auto\\_close\n\n</td><td>\n\nIf true, automatically closes a map information window before opening a new one.-   Type: true/false\n-   Default value: true\n-   Location: **System Properties** &gt; **Google Maps**\n\n\n</td></tr><tr><td>\n\ngoogle.maps.client\n\n</td><td>\n\nClient ID for Google Maps API for Business.-   Type: string\n-   Default value: gme-servicenow\n-   Location: **System Properties** &gt; **Google Maps**\n\n\n</td></tr><tr><td>\n\ngoogle.maps.map\\_id\n\n</td><td>\n\nMap ID for Google Maps used for the cloud-based maps styling, vector maps, and advanced markers. To obtain your Map ID, see [How to create map IDs](http://developers.google.com/maps/documentation/javascript/map-ids/get-map-id).-   Type: string\n-   Default value: empty\n-   Location: **System Properties** &gt; **Google Maps**\n\n\n</td></tr><tr><td>\n\ngoogle.maps.client.key\n\n</td><td>\n\nPrivate key for Google Maps API for Business. This key activates the geolocation feature, which locates users in the system precisely, using data from their mobile devices.-   Type: string\n-   Default value: empty\n-   Location: **System Properties** &gt; **Google Maps**\n\n\n</td></tr><tr><td>\n\ngoogle.maps.version\n\n</td><td>\n\nVersion number of the current installation of Google Maps API for Business.-   Type: string\n-   Default value: current version number\n-   Location: **System Properties** &gt; **Google Maps**\n\n\n</td></tr><tr><td>\n\ngoogle.maps.key\n\n</td><td>\n\nGoogle Maps API for Business or Google Maps JavaScript API Key that ties to the URL of the server. This key authorizes development use of Google Maps API.-   Type: string\n-   Default value: empty\n-   Location: **System Properties** &gt; **Google Maps**\n\n\n</td></tr><tr><td>\n\ngoogle.maps.key.geocoding\n\n</td><td>\n\nGoogle Maps API for business or Google Maps JavaScript API key that ties to the URL of the server. This key is used for making geocoding requests.-   Type: string\n-   Default value: empty\n-   Location: **System Properties** &gt; **Google Maps**\n\n\n</td></tr><tr><td>\n\ngoogle.maps.latitude\n\n</td><td>\n\nStarting latitude of the map. This value determines the starting position displayed in Google Maps.-   Type: string\n-   Default value: 36.008522\n-   Location: **System Properties** &gt; **Google Maps**\n\n\n</td></tr><tr><td>\n\ngoogle.maps.longitude\n\n</td><td>\n\nStarting longitude of the map. This value determines the starting position displayed in Google Maps pages.-   Type: string\n-   Default value: -95.221764\n-   Location: **System Properties** &gt; **Google Maps**\n\n\n</td></tr><tr><td>\n\ngoogle.maps.max\\_items\n\n</td><td>\n\nMaximum number of items to display on the map.-   Type: integer\n-   Default value: 500\n-   Location: **System Properties** &gt; **Google Maps**\n\n\n</td></tr><tr><td>\n\ngoogle.maps.table\n\n</td><td>\n\nTable used by the map. The table needs the following fields: name, longitude, latitude.-   Type: string\n-   Default value: cmn\\_location\n-   Location: **System Properties** &gt; **Google Maps**\n\n\n</td></tr><tr><td>\n\ngoogle.maps.zoom\n\n</td><td>\n\nStarting zoom level of the map \\(1 is the lowest\\)-   Type: string\n-   Default value: 4\n-   Location: **System Properties** &gt; **Google Maps**\n\n\n</td></tr></tbody>\n</table>3.  Perform these configurations:\n\n    1.  Navigate to **System Properties** &gt; **All**.\n\n    2.  Set values for these system properties:\n\n<table id=\"table_dww_kh2_r4b\"><thead><tr><th>\n\nSystem property\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ngoogle.maps.refresh.latlong.duration\n\n</td><td>\n\nNumber of days after which the location details are updated.**Note:** The maximum value is 30.\n\n</td></tr><tr><td>\n\ngoogle.maps.refresh.latlong.record\\_count\\_per\\_table\n\n</td><td>\n\nMaximum number of records in a table that can be processed using the scheduled job in one refresh.\n\n</td></tr></tbody>\n</table>    3.  Specify the tables that store the location details in the Map Coordinates Refresh Configuration \\[cmn\\_coordinate\\_refresh\\_config\\] table.\n\n    4.  If there are no fields to track when the coordinates are last retrieved in your tables:\n\n        1.  Create the **coordinates\\_retrieved\\_on** field of the type **Date/Time** in your tables.\n        2.  Ensure that the value of the field that tracks time when the coordinates are last retrieved, is populated correctly in the Map Coordinates Refresh Configuration \\[cmn\\_coordinate\\_refresh\\_config\\] table. Refer to the sample fix script Update coordinates updated on field to update values in the **coordinates\\_retrieved\\_on** field.\n    5.  Navigate to **System Definition** &gt; **Scheduled Jobs**.\n\n    6.  Open the record, **Refresh Latitude Longitude info of Records**.\n\n    7.  Select the **Active** check box.\n\n    8.  Specify the frequency at which the location details should be refreshed by providing frequency details in **Run** and **Repeat Interval**.\n\n        **Note:** Ensure that you refresh the location details at least once every 30 days.\n\n4.  To access Google Maps from the ServiceNow instance based on your region, perform these configurations.\n\n    1.  Navigate to **User Administration** &gt; **Users**.\n\n    2.  Select and assign the relevant **Country Code** for the required user.\n\n        **Note:** If the required **Country Code** isn't available, add the dictionary entry. Ensure that you use the ISO 3166-1 country codes. For example, the country code of Morocco is `MA`.\n\n    3.  Navigate to **System Properties** &gt; **Google Maps**.\n\n    4.  Select the **Yes** check box for **Enable this property only when you want to alter the Google map's behavior based on a region. The region is populated from the current User's 'Country code' field value in sys\\_user record. The Country code value on the sys\\_user record should be consistent with the expectations from the Google Map's region code. Most Unicode region identifiers are identical to ISO 3166-1 codes, with some notable exceptions. Check the codes properly before making any changes.**\n\n    5.  Click **Save**.\n\n\n**Parent Topic:**[Map pages](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-user-interface/c_MapPages.md)\n\n**Related topics**  \n\n\n[Create a map page]()\n\n[Create a map page module]()\n\n[Create an advanced Map Page]()\n\n[Set map application scope]()\n\n[Create a smartphone map page module]()\n\n[Scripting for map pages]()\n\n"}}