April 13, 201114 yr So in my database of 13,000 address, I want to enter a start address and a time (say 1 hour) and find all records whose address is within 1 hour drive time of the starting address. I know I'll have to hit a web service, via the Viewer, or export to something. I've played around a little with Google Maps, though not gotten an API yet. And Google Fusion tables, but haven't been able to get driving distances out of them.
April 13, 201114 yr I want to enter a start address and a time (say 1 hour) and find all records whose address is within 1 hour drive time of the starting address... 1 hour drive? C'on DJ I'm surprised at you! Will you have fields for speed limit and traffic conditions as well? A bit simpler would be to define the constraint as a distance.
April 14, 201114 yr I just met with another developer for something similar. They used Google maps to get the lat/long of each address. This took several days because the API limits the number of calls that can be made. The dev made a simple database to with a web viewer to get the data from Google and scrape it into the fields. Then use the GeoBox cf to work out a box of lat/long coordinates around a central point, and use these in a multi-predicate relationship to list the addresses that fit within the box. This is surprisingly fast.
April 22, 201114 yr Does anyone have any experience with LatitudeZero plug in? (http://www.hi-voltage.com.au/latitudezero.php) It might solve your solution. I have a client who is considering it, but we haven't purchased it yet. I would be interested in hearing any good or bad experiences.... Jerry
April 22, 201114 yr Author I'm working on a comprehensive blog post, but in short, here's what I did. Looping script Set the Web Viewer to "http://maps.googleapis.com/maps/api/directions/xml?origin=" & Address::Start & "&destination=" & Address::End & "&sensor=false" Scrape the XML content from the Web Viewer using Get(LayoutObjectAttribute)and parse it to find the content between the <duration> tags. Simple once I figured it out. A couple problems.... I'm not sure this use within the license terms of the Google Maps API. You're limited to 2500 calls a day and those have to be spread out over the whole day. I used a robot machine and Install On Timer script to pull 2000 times over the course a few hours and got the results I wanted.
Create an account or sign in to comment