mongoose geojson in schema, "Can't extract geo keys" error
I think you need to upgrade GeoJSON.Point
to a sub document with a proper schema:
GeoJSON.Point = new mongoose.Schema({ 'type' : { type: String, default: "Point" }, coordinates: [ { type: "Number" } ]});
Combined with the minimize
option, which it enabled by default, this will make Mongoose only save the location
property if it is actually set.