Populate Latitude and Longitude on existing locations in cmn_location table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
I am trying to solve a problem with the map displaying locations in the cmn_location table.
- I performed a bulk data load of locations to the cmn_location table.
- Latitude and Longitude are not populating.
- When I manually enter a Latitude and Longitude it does show up on the map.
- I have obtained a Google Maps API key and populated the following entries on the Google Maps Properties page. (Note, one key has been put in each of the following) (See screenshot with redacted key)
- "Private key for Google Maps API for Business".
- "Map key from Google, tied to the URL of the server".
- Customer provided Google Maps key used for geocoding requests".
- I made sure the get_lat_long for the Location [cmn_locaiton] is active.
- I went to schedule job "Refresh Latitude Longitude info of Records"
- It is active.
- I forced it with an "Execute Now" (I really don't think it did anything. I don't know how to identify if it actually ran and succeeded or failed. I tried going to the dashboard but could not find anything for this job or nothing that I could interpret as it worked or failed.)
I'm sure that I'm missing something. Does anyone have any thoughts on what I am missing or what I should do to populate the lat and lon?
Thank you in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
55m ago
Issue
After Google maps api are set up correctly, the latitude and longitude are not getting updated on location cmn_location after creating or updating addresses in the same table.
Resolution
- Activate the Process Geocoding Request scheduled job:
https://<instance_name>.service-now.com/nav_to.do?uri=sysauto_script.do?sys_id=002c1e70eb11020079a62a7ac106fe26
When a Company or Location record is created, or has one of its address fields changed [street, city, state, zip or country], the get_lat_long business rule is triggered. This business rule uses the GoogleMapsHelper script include to create sys_geocoding_request records.
The scheduled job Process Geocoding Request must be enabled to process sys_geocoding_request records. Process Geocoding Request uses the Google Map service to populate the latitude and longitude fields of the changed or created Company and Location records.
just FYI- check this KB as well :KB0522699 The get_lat_long business rule is not populating latitude and longitude