Google Maps - Business Rule to Populate Latitude & Longitude is not working

Jenny17
Tera Contributor

Has anyone recently enabled the Google Maps Plugin?  We recently obtained an API Key from Google, turned on the Business Rule: get_lat_long & activated the Scheduled Job: Process Geocoding Request. 

The Business Rule is not populating the lat & long in our Location table.  

We found an older article in the Community (see link below) and tried the script in the article, it did not work either. 

https://community.servicenow.com/community?id=community_question&sys_id=71a30f65dbd8dbc01dcaf3231f96...

Does anyone who has recently enabled Google Maps have any tips they can share?

10 REPLIES 10

Gotcha, next question is has the scheduled job been run yet?

Yes we hit "Execute Now" after we changed the script in the Business Rule.  Nothing happened.

Jenny17
Tera Contributor

I'll rephrase, Latitudes and Longitudes were not populated. I just tried this again and there is also no Traffic on the API dashboard.

Where did you input the API key that you received from google? Also, can you show the code from the scheduled job?

BrownBear
Tera Contributor

I know this post is 6 yrs old but curious if you got this working? I just experienced using it and had a similar issue with the OOB business rule. I got it to work after several iterations by ensuring the Location record had the correct address formatting. For example, if the USPS has an address as "123 West Fillmore St, Wichita, KS, 12456" but you have the city as "West Wichita," the business rule will fail. Once you change "West Wichita" to "Wichita" it works.