How To Guide

Getting Started with Google Mapping

Last Updated:
August 25, 2016

Using the Google Map API, you can provide interactive map plotting using address, zip code, or latitude/longitude coordinates stored in your System i database files. Below are 5 quick steps to get the process working for you:

  1. First, you must obtain a key from Google. The following link will take you to the main Google Maps API page:
  2. Once you have your key, you need to add it to a starting page that will be accessed by a browser. We can provide you with a simple page to use - Sequelmap.htm - that works in con- junction with a SEQUEL-produced xml mapping data file.

    Open the sequelmap.htm file with a text editor, and add your key by finding and replacing the key value (key=) in the following line:

    script src=" key=ABQIAAAAsI3C5aBzvKJss9rdUsRKGxTYxGDrlepneNQn1cxPU5XcR1g7cRTPLjd7 TEeIayGtNtp6keXX-JR6OA"
    (the above is entered on one line)
  3. Save your sequelmap.htm file, and place it in a location that can be served by your http server. This may or may not be an iSeries machine. If the Google server cannot access this page, the mapping api will not work.
  4. Run an appropriately designed query to output the required xml data. You must write the xml data to a location that can be accessed by the server that serves the sequelmap.htm file. You can eliminate the need to worry about browser security settings by placing the sequelmap.htm and the xml data on the same server, but this is not required.
  5. Serve the sequelmap.htm file to a browser, passing the location and name of the associated xml data. The example URL below shows an xml file (mapdata.xml) associated with the sam- ple sequelmap.htm file.


The How-To article, SEQUEL with Google Mapping, has a more complete explanation of the Google Mapping process, and how the xml data should be formatted.


Related Products