Google Maps Mashup

Contact Validation Web Services and Google Maps

Includes Sample Code and Instructions
One of the things that makes Web services so simple (and fun) to use is how easily they can integrate into 3rd party platforms, APIs, and frameworks. Google Maps, for example, makes an excellent fit for our Address Validation Plus Web service, as well as any of our products that return a latitude and longitude. Just for fun, the developers at Service Objects wrote a quick sample that does just that.

To download sample code, visit /products/address-geocoding/address-validation-plus-us/google-maps-mashup.

By modifying the existing PHP sample code, a function was created that uses embedded PHP to generate the necessary javascript for placing a Google Map onto a page. The server-side code, once it receives a response from our service, sends the latitude/longitude values to a function that constructs the script body, and instantiates the GMap, GPoints and Markers with the values of server-side PHP variables.

To use this sample, extract the PHP file to your web server, and navigate to it in your browser. You'll see a form with address fields, a license key field, and a Google Maps API Key field. The sample is coded to use our trial servers, so to use it as-is, you will need to obtain a trial key. If you're a customer, you can change the service URL in the code to point to "" and use your production key instead.

To obtain a Google Maps API Key, go to this URL:

This is just a very simple example. It could be extended to use Google Maps' directions API to give you shortest-distance paths between two addresses. You can also create overlays, showing block and tract codes. There are some fantastic possibilities out there for visualizing and displaying our data, and Google Maps is a great example. Try it out today and let us know what you think!