views:

13

answers:

1

I have a MySQL database of addresses (my custom points of interest - not Googles) and their associated Lat/Long. What would be the simplest way for a user to my site (their lat/long is also stored in their user profile) to be shown a:

  1. google map with their own lat/long as a starting (center) point
  2. default radius of 10 Miles
  3. all Points of Interest within that 10mile radius

If it is simpler to use zipcodes for the POI's and the user I have those as well.

Thanks in advance for any advice given, or information leading to tutorials that could get this done.

+1  A: 

You can see how to get the lat/lon radius on another question: http://stackoverflow.com/questions/2296824/php-mysql-compare-long-and-lat-return-ones-under-10-miles

You will need to implement access to the google maps api and dump the variables into the points of interest. You may be able to glean some useful information from a cakephp helper: http://github.com/cdburgess/helpers/blob/master/google_map.php

You should be able to strip out the function and use it properly in PHP.

cdburgess