views:

756

answers:

1

Greetings:

I have put together a RESTful web service in .NET 3.5 that takes a phone number and does a reverse lookup to retrieve the ZIP code of that location. I am now creating an *.aspx page that will present the output of a request to the Google Maps API. This output will be a polygon on a map that will be that US ZIP code. I'm wondering if I could just pass in only that ZIP code in the http request for the address parameter. The example at http://code.google.com/apis/maps/documentation/geocoding/ basically passes in the entire street address. Not quite sure if the ZIP would be sufficient.

Anyone had experience working with this?

Thanks in advance!

Todd

+2  A: 

Passing in just the zip code should work fine.

Making a request to http://maps.google.com/maps/geo?q=63131&output=json&oe=utf8&sensor=false gives you a valid result with a LatLonBox in the ExtendedData property. You'll have to manually go to that URL, since Google refuses requests without an API key if they have a referring URL.

bdukes
I also made note that yahoo has a similar RESTful geocoding service. I appreciate it again!
Todd