I get the following error: mongodb 2.4.3
Can't extract geo keys from object, malformed geometry?
{type: "Polygon", coordinates: [ [ [ 103.8324334524412, 1.284232321447769 ], [ 103.8342325475588, 1.284232321447769 ], [ 103.8342325469261, 1.282433678236006 ], [ 103.8324334530738, 1.282433678236006 ] ] ]}
Can someone help me understand the problem? it looks like a valid geoJSON object. My index is of 2dsphere type.
I follow these two steps:
collection.ensureIndex {'geometry' : "2dsphere"}, (error) =>
The insert request gives this error. The whole document I'm trying to insert:
{ "type":"Feature", "geometry": { "type":"Polygon", "coordinates":[ [ [103.83243345244122,1.2842323214477689], [103.83423254755876,1.2842323214477689], [103.83423254692615,1.2824336782360055], [103.83243345307383,1.2824336782360055] ] ] }, "properties":{"name" : "My location"} }
source share