Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Driving proximity searches

Featured Replies

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.

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? :D

A bit simpler would be to define the constraint as a distance.

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.

  • 2 weeks later...

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

  • 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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.