function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ravi LalRavi Lal 

can we calculate distance betwwen two zip code uisng lightning web development?

VinayVinay (Salesforce Developers) 
Hi Ravi,

Check below examples.

https://hicglobalsolutions.com/blog/find-distance-between-two-zip-codes-using-google-api/
https://salesforce.stackexchange.com/questions/116250/can-somebody-help-me-in-finding-distance-using-zipcodes-and-google-apis

Thanks,
AbhishekAbhishek (Salesforce Developers) 
Typically people do this by doing the math between the latitude and longitude.  When you do distance between zips typically people use the center lat/lon as the location does to the distance.  Given the great tools on the web, you may want to use actual addresses vs. just zips.  To get the distance between two lats/lons is just math.   Below are two links. One with code and one with the math!  Good luck!
 
pat 
  
 
http://www.codewalkers.com/c/a/Miscellaneous-Code/Calculate-Distance-Between-Two-ZIP-Codes/ 
http://mathforum.org/library/drmath/view/51722.html


Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks.