How To Use

An Example:

Turn this location

San Francisco, CA

into this latitude and longitude pair

37.775196,-122.419204

which is good to use in Google Maps applications.

We’ll even give you an example map to prove that it worked.

Then, if you’re really nice, we’ll even give you the code to make your own static image map using Google Static Maps. Of course, you have to provide the API key, but we’ll do the rest.

Do we have an API?

That’s a silly question. Of course we do. It’s ridiculously simple though. No REST calls. No authentication.

Here’s an example url:

http://tinygeocoder.com/create-api.php?q=Perris,CA

And the results for that call would just be:

33.790348,-117.226085

What about Reverse Geo-coding?

Yes, we can do reverse geo-coding now too (as of November 29th, 2008).

The way to do that is with the API. Here’s an example (make sure the lat/lon are specified exactly as shown, no spaces):

http://tinygeocoder.com/create-api.php?g=33.790348,-117.226085

And the results for that call would be as follows (the address closest to the coordinates):

498 N Perris Blvd, Perris, CA 92570, USA

What about JSONP and JavaScript callback functions?

Thanks to David Evans of CanTab for the suggestion, we now supply a wonderful little addition to the API. Let’s just say you wanted to include a callback function because you use our service in JavaScript… well, we’ll handle that too. Just include a “callback” parameter in the querystring like so:

http://tinygeocoder.com/create-api.php?q=San+Francisco&callback=myFunctionName

And the results for that call would be as follows (using the header “application/javascript”, of course):

myFunctionName([37.775196,-122.419204]);

See, we do like suggestions, and we do implement them quickly! Try me.

I also appreciate “Thank you” messages in all kinds of different ways (and amounts). :)


One Response to “How To Use”