Dragging map changes search results
How would you implement draggable search results with Google maps API v3 akin to the way Yelp does.
My guess is that you would bind to a map move event and link to an anchor like #l=g:-122.47764587402344,37.75225820732335,-122.37464904785155,37.83419172060041
and pass those bounds through to the search.
B开发者_高级运维tw, this is for a Rails project.
Here's the Map reference: http://code.google.com/apis/maps/documentation/javascript/reference.html#Map
The event "bounds_changed" seems to be what you want.
When it fires you should get the map boundaries using map.getBounds()
and pass that along to your search.
精彩评论