开发者

gmaps - find locations within visible area

开发者 https://www.devze.com 2023-02-09 01:38 出处:网络
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'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 开发者_StackOverflowlot but i would need it to be exactly within the visible part (rectangle).

Any idea how that works?

Thanks in advance!


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消