A 2d geo index wants two elements. With the first being the longitude (x) and the second one being the latitude (y) (as in GeoJSON).


The following are all equivalent:


$myCol->insert( [
    _id: 42, loc: [ 6.43, 52.1233 ]
] );
$myCol->insert( [
    _id: 42, loc: { long: 6.43, lat: 52.1233 }
] );
$myCol->insert( [
    _id: 42, loc: { latitude: 6.43, longitude: 52.1233 }
] );