Trying to set up my database field for geocoding like this:
MyCollection._ensureIndex({'data.address.located':'2dsphere'});
However, encountering an error message:
MongoError: Can't extract geo keys from object, malformed geometry?:
{ type: "Point", coordinates: [ 32.4586858, -110.8571443 ] }
Having trouble identifying the issue with this field. Any suggestions?
Referencing this link, it provides this example:
The following example stores a GeoJSON Point:
{ loc: { type: "Point", coordinates: [ 40, 5 ] } }