All Projects → joshsoftware → Mongo_geo_demo

joshsoftware / Mongo_geo_demo

Mongoid + Mongoid_geo demo

Programming Languages

ruby
36898 projects - #4 most used programming language

= Demo steps

Create some Storefront, Business and Location objects

== Geo-spatial search: StoreFront.near(:location => Geocoder.search("New York").first.coordinates)

== Geo-spatial relational search

irb> Location.near(:coordinates => Geocoder.search("New York").first.coordinates).first.businesses

irb> Location.near(:coordinates => Geocoder.search("New York").first.coordinates).collect(&:businesses)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].