javascript - Best way to calculate distance between two Postcodes (UK)? -


what method recommend use calculate distance between 2 uk postcodes decide whether in range or not?

i not displaying map, showing list of results of valid locations. e.g. locations within 50 miles of bt53 6ex

this suggestion, don't specify answer question in satisfactory way.

store latitude , longitude along postcodes , filter latitude , longitude difference within 50 miles:

select * postcodes abs(latitude - @lat) < 50 , abs(longitude - @lng) < 50 

then filter resulting set computing actual distance, because query above return in square 50 miles distance, not in radial distance.


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -