I don't have school table in my database...I want to display schools using other apis...
-- Liju -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of donb Sent: Monday, December 29, 2008 11:06 PM To: Google Maps API Subject: Re: Find near by Schools Known as the 'Haversine formula' for calculating distance (you can google for more examples using that term): SELECT ((ACOS(SIN($lat * PI() / 180) * SIN(lat * PI() / 180) + COS ($lat * PI() / 180) * COS(lat * PI() / 180) * COS(($lon - lon) * PI () / 180)) * 180 / PI()) * 60 * 1.1515) AS distance FROM SCHOOLS HAVING distance<='$distance' ORDER BY distance ASC assuming you have a table of schools named 'SCHOOLS' and you already know the $lat and $lon of the property and want matches within $distance miles By multiplying 1.1515 * 1.609 the distance would be expressed in Km. On Dec 29, 8:44 am, liju <[email protected]> wrote: > Is there any way to get the schools near by a property....I have a > address and want to display the schools near by to that property.. > > For eg: > > http://www.cbhk.com/property/property.asp?PRM_Community=Midtown%20Eas...RES* VAR_Region=MAN*VAR_Propertycommunity=*PRM_City=*PRM_Minimum_Price=*PRM_Maxim um_Price=*PRM_Minimum_Beds=*PRM_Minimum_Baths= > > Click on the Schools tab --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" 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-API?hl=en -~----------~----~----~----~------~----~------~--~---
