We have built a multi-search tool with php working with a mySQL database of LatLng Coordinates. The page is here: http://www.orcaretirement.com/search_master.php
Currently, for one of the three searches, the user searches by (Canadian) Postal Code which checks the database for that postal code. But we have decided we want something smarter. So I want to build a function that: 1. Takes the input Postal Code as a variable 2. Uses a standard radius of say 30 kms 3. And collects and returns all the records from the database (and map markers) within a 30 km radius of that postal code. 4. And to be perfectly clever about the whole thing, if there are NO results in the radius of 30km, then a result of ONE of the next nearest result. Now I know I can assign an approximate set of coordinates to a postal code using the Geocoder Object - http://code.google.com/apis/maps/documentation/javascript/services.html#Geocoding But the most I can so far get from that is a JavaScript variable that I can't re-use with my php code. At least not without a whole lot of trouble as far as I understand, so: 1. How do I dynamically find and use approximate coordinates derived from a Postal Code, especially as a php variable? 2. Once I have that variable, how do I do a radius search of Coordinates from a Database? I have spent a few days trying to sort this out; and I have to imagine someone else has managed to do something similar and any help and tips would be seriously appreciated. Thank you. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
