Skip to main content
Inspiring
February 22, 2010
Question

ColdFusion <cfmap>,<cfmapitem> and Google Maps API

  • February 22, 2010
  • 1 reply
  • 578 views

Hi community!

I am trying to write a small address verification app for a section of my company's website. It is nothing fancy, we just want our page to tell us if an address exists or not and pop up a message accordingly. For example address: 123 Main St aState, aCity, 12345 once this address is verified it should return a not found message because aState and aCity are not real state and cities. If the address exists, then we want to display the customer's information with its Google Map "fancily" displayed! Any thoughts? Ideas?

Thanks!

Apocalipsis!

This topic has been closed for replies.

1 reply

Participating Frequently
February 22, 2010

You could probably use the geocoding functionality from google to test that.

<cfset address = urlEncodedFormat(address)>

<cfhttp url="http://maps.google.com/maps/geo?q=#address#&output=csv&sensor=false&key#yourgooglekey#"

result="data" method="get">

Google returns status codes and details for the result.  Do a dump of data.filecontent  with a good and bad address.  Of course you could do output format in other ways and use the same data that way too.