View Single Post
  #2  
Old 07-12-2009, 08:42 PM
kato13's Avatar
kato13 kato13 is online now
Administrator
 
Join Date: May 2007
Location: Chicago, Il USA
Posts: 3,654
Send a message via ICQ to kato13
Default

Quote:
Originally Posted by pmulcahy11b
How'd you get that search automated?
I do most of my stuff via a perl backend on my webserver but there is a neat pure html/javascript way to do it.

First you need to get a map key for your website.
http://code.google.com/apis/maps/signup.html

Second view and copy source from this page.
http://maps.juhlin.com/maps/geomulti_demo.htm

Third Replace my map key with yours.
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=***your_key_here***" type="text/javascript"></script>


Fourth Put the addresses you want in here.

var addresses = [
"PAWNEE EAST, OK",
"MEHAN NE, OK",
"RATTLESNAKE, OK",
"ORLANDO EAST, OK",
"HARTSHORNE, OK"
];


Fifth upload the file to your webserver and view it. It will process about one record every 2 seconds.

It works nice up to about 1000 records then the browser slows down so I suggest breaking the data down into ~1000 record chunks.

Edit; Oho another thing is that is is usually best to provide a full state name to Google as they will often interpret CA as Canada and CO as Columbia and KY as one of the Former Soviet republics.

Last edited by kato13; 07-12-2009 at 08:59 PM.
Reply With Quote