What is Google Geocoding?

Geocoding is the process of converting addresses into geographic coordinates (latitude and longitude) which are used as markers in Google Maps. In this post, we are going to see how we can use Google maps API for Geocoding in Domino applications. For more information about Google Geocoding, please follow the link.

Google Maps API‎ for GeocodingWhat do we need to know?

To understand this post, a fair knowledge on Lotus script and JSON is necessary. To parse and read the response from Google API, we need to use JSON Script Library in Lotusscript. Please click on the link to download JSON Script Library.

Google Maps API‎ for Geocoding in Domino: How to?

There are several ways to consume RESTFUL web services in Lotus Notes. In that, one of the method is using CURL. However, CURL has to be installed on every client machine, if we want to run on a Notes Client application. Therefore, we are going to follow OLE Automation object based approach, assuming we are running on a Windows Client.

The snippet below shows a function creating an OLE object and getting the response for the URL, that is passed as variant. We are going to use this function for getting our JSON response from Google Geocode API.

Google Maps API‎ for Geocoding

The snippet below shows, setting the required parameters for our Google Geocode API.

(please note to use your Google API Key for getting the Geocode response)

Google Geocoding

The code below shows parsing of response using JSON Script Library.

Google Maps API‎ for Geocoding in Domino