LearnBoost/mongoose — Issue #664: Issue creating GeoSpatial indexes with altered range
Author: antz29
Created: 2011-12-26 22:07:04+00:00
State: open

Hi there

I'm trying to create a geospatial index with an altered range and it appears to be having problems. Test code below:

```javascript
var mongoose = require('mongoose');
mongoose.connect('mongodb://127.0.0.1/verve');

var Model = new mongoose.Schema({
type : { type : String },
loc : Array
});

Model.index({loc:'2d'},{min : 0,max : 1024});

var Mod = mongoose.model('Model',Model);
var m = new Mod();

m.loc = [250,250];
m.type = 'test';

m.save(function(err) {
console.log(err);
});
```
Will output "MongoError: point not in interval of [ -180, 180 )"

Am I passing the options for the index correctly?

Many thanks

John