Skip to content

Instantly share code, notes, and snippets.

@kapkaev
Created December 19, 2012 14:50
Show Gist options
  • Save kapkaev/4337182 to your computer and use it in GitHub Desktop.
Save kapkaev/4337182 to your computer and use it in GitHub Desktop.
# Search by polygons
t = Tire.search('places', load:false) do
query { all }
sw = [55.524508, 36.414773] #lat, lng
ne = [55.974333, 38.886697]
nw = [55.974333, 36.414773]
se = [55.524508, 38.886697]
filter :geo_polygon, lat_lng: {points: [sw, ne, nw, se, sw]}
end.results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment