I need the user to enter their address and a list of my widgets based on the distance from their address. I have THOUSAND addresses for my widgets, and users have an infinite number of addresses.
Any ideas?
Thank.
SELECT latitude, longitude, SQRT( POW( 69.1 * ( latitude - 52.58 ) , 2 ) + POW( 69.1 * ( - 1.12 - longitude ) * COS( latitude / 57.3 ) , 2 ) ) AS distance FROM location ORDER BY distance
- , .
MySQL, ,
Google . , . , .
, :
A/As , , , . . Google, "", . ( - .)
B/ Google , , , 5000 IP- , . , .
C/ , .
D/ .
This blog post, βCalculate distance using the Google Maps API,β can be of some help.
Source: https://habr.com/ru/post/1737418/More articles:Get current cross-platform time in C ++ - c ++trigger an event using jQuery live or delegate - jqueryImport / export rails and tables - ruby-on-railsRuntime ALTER COLUMN - sqlIn C ++, where are static, dynamic, and local variables stored? How about in C and Java? - javaProblem with streaming WCF - wcfThe default XAMPP folder for OSX is xamppUnable to iterate a collection of anonymous types created from a LINQ query in VB.NET - iterationCall SSIS from BizTalk Orchestration - biztalkAS3: Make sure children stay inside the parent movie clip form - flashAll Articles