Welcome Guest, Not a member yet? Register   Sign In
Developing a complex search...
#1

[eluser]Wonder Woman[/eluser]
Hi,

I'm looking to develop a complex search which takes a location and/or postcode which returns the lat/long coordinates of this place and then searches for places which are located near within a specified radius parameter which will be selected. Does this make sense? Similar to how http://www.rightmove.co.uk do their property search?

I've not done anything this complex before and I have managed to download a file from http://www.easypeasy.com which has all of the postcodes in for the UK and it also has the lat/long coordinates of these postcodes as well. I figured this would be useful.

If you could help me in any way I would be most grateful.

Thanks
#2

[eluser]stevezissou[/eluser]
The simplest way would be to use an existing API. Check out Yahoo Placefinder: http://developer.yahoo.com/geo/placefinder/
#3

[eluser]danmontgomery[/eluser]
This is done with the haversine formula, which is an implementation of the great circle distance formula. It's relatively easy to implement, it can be done in a single MySQL statement (give lat and long, get zip codes within X distance). Google happily gives you several examples of this.




Theme © iAndrew 2016 - Forum software by © MyBB