Forum Moderators: phranque

Message Too Old, No Replies

php Latitiude and longitude search

looking for off the shelf script

         

soapystar

2:40 pm on Oct 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



been looking for an off the shelf php/mysql script that will allow me to enter a series of Latitiude and longitude locations for a landmark and then have a search function to return all listings on the website within a given distance for that landmark....of anyone has cme acros one would be glad to hear since i cant find anything that will suit my needs..thanks!

trillianjedi

8:10 pm on Oct 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi SoapyStar,

This is basic maths, as long as you have the lat/long co-ordinates for each landmark.

See here:-

[jan.ucc.nau.edu...]

and then here:-

[mathforum.com...]

I'm sure the guys in the php forum could then guide you further as to the actual code, but it should be quite simple.

If you want to hunt around for some code snippets, try the ham radio communities. I'm sure I've seen scripts (php/Java) written by radio hams for determining distance between two radio stations. In those circles, Lat/Long is commonly converted to "Maidenhead Locator Squares" - again an easy conversion in maths to and from Lat/Long.

That may give you some new search terms to try. I'll sticky you the one I found, which very nearly does exactly what you want.

TJ

g1smd

8:35 pm on Oct 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I haven't got any direct links to what you want but distance and bearing calculations are often used by Amateur Radio Operators (look for "WW-LOC" and "IARU Locator" as keywords) and in some astronomical applications too. I remember running such calculations in Basic on a BBC Micro back in 1983/1985 or thereabouts.