We are developing a draw search feature on our property website, similar to http://www.rightmove.co.uk/property-for-sale/draw-a-search.html?locationIdentifier=OUTCODE%5E186&insId=1
This draw search feature allows a user to draw a defined area on a map, and properties available within that defined area will show in the search results.
99% of the work has been done. We have the map returning the coordinates (lat/lon) when the user selects an area and we have the lat/lon coordinates of every property in our database.
However we need help with one line for sql query which will match the coordinates with the relevant properties. We really just need one line of code………just now we have $Contains = "AND Contains(GeomFromText('POLYGON((".$coords."))'),GeomFromText(property_latitude,property_longitude))"; which does not appear to be working.
Urgent turnaround required on this.