How to do spatial search using mongodb queries? -
i trying use spatial search in android app. new mongodb , spatial search. trying implement query in command prompt displays nothing
db.places.find( { loc: { $geowithin : { $center : [ [x, y], 10 ] } } } )
inplace of x , y wrote longitude , latitude. want spatial search around particular longitude , latitude. should write in loc, x, y?
please help!!!!
thanks in advance.
look @ this: http://docs.mongodb.org/manual/reference/operator/center/
check http://docs.mongodb.org/manual manual, helps lot.