1

I'm trying to develop a function that gets all relevant records within the currently visible area.

http://code.google.com/apis/maps/articles/phpsqlsearch.html

I found this tutorial (and got it to work) to get locations within a radius which helped a lot but i would need it to be exactly within the visible part (rectangle).

Any idea how that works?

Thanks in advance!

n00b
  • 16,088
  • 21
  • 56
  • 72
  • Alright i found a solution: http://stackoverflow.com/questions/4834772/get-all-records-from-mysql-database-that-are-within-google-maps-getbounds – n00b Feb 08 '11 at 15:08

1 Answers1

1

The current visible area can be determined by the Map objects getBounds() method. If you have a list of points or lat/longs, you can use MySQL to query this, providing the bounds returned from the map. You can also use Fusion Tables to store your data instead of MySQL and use its relatively new Geo methods.

Tony Miller
  • 9,059
  • 2
  • 27
  • 46