ainoy31 Posted August 20, 2007 Share Posted August 20, 2007 Helllo- Does anyone know of a tutorial or script that will calculate driving distance between two street addresses? I have only found ones that does it base on zip codes. Much appreciation. Quote Link to comment https://forums.phpfreaks.com/topic/65831-street-address-calculation/ Share on other sites More sharing options...
zq29 Posted August 21, 2007 Share Posted August 21, 2007 If you have a database that maps street addresses to long/lat coordinates it's fairly straight forward to calculate reasonably accurate distances as-the-crow-flys. Driving distance, I'm sure is very complicated - Not sure where it lies in their T&Cs but it might be possible to scrape Google Maps... Quote Link to comment https://forums.phpfreaks.com/topic/65831-street-address-calculation/#findComment-329897 Share on other sites More sharing options...
Ninjakreborn Posted August 21, 2007 Share Posted August 21, 2007 It would be nearly impossible to getting driving distance yourself. You can't humanly possibly map out roads, and everything else yourself. Google had literally THOUSANDS of people collecting data from around the world. Collected street names, length's of street's, length's from street to street. They did freeform calculations from one area to another to base other's off of. That's not a solo 1 man project. What you CAN do is make your "php script" visit www.mapquest.com or google maps, put in the 2 addresses, get the information and return it to your site without the use knowing. Maybe able to do it without it, but if you have problems, use curl. Quote Link to comment https://forums.phpfreaks.com/topic/65831-street-address-calculation/#findComment-329900 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.