Benjamin Crouzier
Benjamin Crouzier

Reputation: 41945

How to search only within the displayed map with google maps?

Airbnb has a feature on their main search page that only the results in the map are shown. Is it something that is supported by the google maps api ?

I am using the gem gmaps4rails. I havn't found this in neither in the google maps api not in the gem.

Basically what I want is the bounds of the map so that I know what constraints to search with, so that the results fit in the map.

How do you think it can be done ?

Upvotes: 0

Views: 134

Answers (1)

Joachim Rohde
Joachim Rohde

Reputation: 6045

The Map-class has a method called getBounds().

Upvotes: 2

Related Questions