Yay an actual question about PHP! :DI think you'll need more data at the moment you seem to be only able to calculate a straight line as you have essentially got a x and y location for a start and finish.
http://www.movable-type.co.uk/scripts/latlong.htmlGives some yummy formulae to work with. Javascript examples but I'm sure you can convert it easy enough. :)
Cheers, Aaron*Aaron Singline* (about me <http://www.turboweb.co.nz/team/2/Aaron-Singline-Co-Founder?ref=email>)
Co-Founder / Support *Turboweb Limited* Office: +64 3 474 5953 Cell: 022 657 8302 Web: www.turboweb.co.nz Twitter: twitter.com/turboweb <http://twitter.com/turboweb> Facebook: facebook.com/turboweb <http://facebook.com/turboweb> Turboweb Limited 23 Vogel St Dunedin 9016 New Zealand/Need help? Please email [email protected] <mailto:[email protected]>/
On 30/04/2013 4:30 p.m., Olivia wrote:
Hi all,I am using PHP 5.3.9 and I am trying to figure out how to calculate the size of a bounding box based on the passed in coordinates of the 4 corners of a geographical map. The reason for this is that I need to check that the size/area of the bounding box is not larger than 20 Kilometres.The bounding box format is defined as: $southwest_lat = $_GET['swlat']; $southwest_lng = $_GET['swlng']; $northeast_lat = $_GET['nelat']; $northeast_lng = $_GET['nelng']; Your help is much appreciated. Kind regards, Olivia -- -- NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [email protected] ---You received this message because you are subscribed to the Google Groups "NZ PHP Users Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].For more options, visit https://groups.google.com/groups/opt_out.
-- -- NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [email protected]--- You received this message because you are subscribed to the Google Groups "NZ PHP Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
<<inline: turboweb-s.jpg>>
