Google Maps Geocodes

Beatnik on 2006-11-21T11:14:32

I'm playing with Google Maps (this Javascript stuff isn't all THAT hard!). It turns out most of the mapping is done with coordinates (go figure) but I couldn't find a quick way to look up the geocodes for a specific address. I browsed around on the Google Maps API page and found a nice example I could abuse (I can't seem to find the example anymore.. perhaps it's in a wiki somewhere). I adapted the code so it also displays the correct longitude and latitude of the address. I store this information in an XML file and load it with the GXML class in the API. The following HTML/Javascript works for me:



  
    
    Google Maps JavaScript API Example
    
    
  

  

    
    

Search for an address:

Try these:
43 Church Street, Parry Sound, ON P2A 1Y6, Canada

As an example address, I used a nice bed and breakfast I stayed a few years ago. See it in action here.


Geocoding

n1vux on 2006-11-21T16:39:22

> I couldn't find a quick way to look up the geocodes for a specific address.

http://geocoder.us/ service [NonCommercial-ShareAlike and Commercial licenses]
http://search.cpan.org/user/sderle/Geo-Coder-US/ engine library [Perl GPL+Artistic]
using same public USG database as everyone else.

Re:Geocoding

Beatnik on 2006-11-21T22:01:12

The only problem is that I'm looking up locations in Canada eh.. Both solutions won't work to find geocodes there :(

Re:Geocoding

n1vux on 2006-11-22T16:42:46

Ah. yes, TigerLine data assumes 99999-9999 postal codes not 9A9-A9A or vice versa ... and doesn't include the frozen provinces to the north.