jim shelton Posted October 26, 2010 Posted October 26, 2010 I am looking for a plug-in that will allow us to track mileage from one single to Zip Code to other US Zip Codes. thanks, Jim
fseipel Posted October 26, 2010 Posted October 26, 2010 I would suggest using the 360Works ScriptMaster plugin for this. The included GetURL As Text function can be used, with a URL such as: http://maps.google.com/maps?q=from+FROM+to+TO&output=kml where FROM=from zip code or address and TO=ending address or zip code. The Position function may then be used to parse out the text results from this function. The data you want lies between "CDATA[Distance:" and " " -- extract distance in miles or km, drive time, etc. Alternately the WebViewer can be used for this, but it requires a webviewer layout element (even if only one pixel).
Newbies cheekus124 Posted January 11, 2011 Newbies Posted January 11, 2011 If you want to do this entirely in Filemaker with one calculation, here is the calculation and data set for determining the distance between any two US ZIP codes. I did this recently as part of another project. I created a distance formula by recoding one from Excel and then used freely available data that lists the lat lon for all US ZIP codes. Here is the equation: ##code start: If ( _CountryID ≠ "001" or IsEmpty (PostalCodes::Latitude); 5000; Round ( 6371 * 2 * Asin ( Sqrt ( ( Sin ( ( Radians (_gSearch_Latitude) - Radians (PostalCodes::Latitude) ) / 2 ) ^ 2 ) + Cos ( Radians (_gSearch_Latitude) ) * Cos ( Radians (PostalCodes::Latitude) ) * ( Sin ( ( Radians (_gSearch_Longitude) - Radians (PostalCodes::Longitude) ) / 2 ) ^ 2 ) ) ); 0 ) ) # code end I had multiple country data in my set, so I used the if() so that it only calculated distances for US addresses. The ZIP code data set is attached. US.zip
Recommended Posts
This topic is 5138 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now