GeoJSON Python Eve Example -
i trying make geojson query work per eve documentation (v0.6.1-dev): http://python-eve.org/features.html
however, query in postman returns error:
postman get: http://localhost:5000/people?where={"location": {"$near": {"$geometry": {"type":"point", "coordinates": [10.0, 20.0]}, "$maxdistance": 1000}}}
error: 500 internal server error server encountered internal error , unable complete request. either server overloaded or there error in application.
the 'people' collection contains location show below:
postman get: http://localhost:5000/people
"_items": [ { "_updated": "wed, 30 sep 2015 10:26:51 gmt", "firstname": "john", "lastname": "doe", "born": "thu, 27 aug 1970 14:37:13 gmt", "role": [ "author" ], **"location": { "type": "point", "coordinates": [ 100, 0 ] },** "_links": { "self": { "href": "people/560bb8eb6adf7d0e70f26cd0", "title": "person" } },
any idea why not work ?
try switch on debug mode (set debug = true
in settings) , see actual error is. there no geo index field (eve not automatically create indexes you).
update: starting v0.6, can ask eve maintain index you, see mongo_indexes
keyword in docs
Comments
Post a Comment