@@ -109,6 +109,22 @@ describe('Document geo query test', function(){
109109 ' </gElemPair>' +
110110 ' <gAttrPair latitude="250" longitude="144"/>' +
111111 '</root>'
112+ } ,
113+ {
114+ uri : '/test/query/geo/doc6.json' ,
115+ collections : [ 'geoCollection' ] ,
116+ contentType : 'application/json' ,
117+ content : {
118+ title : 'cross_pole' ,
119+ gElemPoint : '37.2768,-77.4008' ,
120+ gElemChildParent : {
121+ gElemChildPoint : '37.2768,-77.4008'
122+ } ,
123+ gElemPair : {
124+ latitude : 37.2768 ,
125+ longitude : - 77.4008
126+ }
127+ }
112128 }
113129 ) .
114130 result ( function ( response ) { done ( ) ; } , done ) ;
@@ -226,6 +242,23 @@ describe('Document geo query test', function(){
226242 } , done ) ;
227243 } ) ;
228244
245+ it ( 'should do geo property pair query with circle in crossed pole' , function ( done ) {
246+ dbWriter . documents . query (
247+ q . where (
248+ q . geospatial (
249+ q . geoPropertyPair ( 'gElemPair' , 'latitude' , 'longitude' ) ,
250+ q . circle ( 2000 , 32.2768 , - 62.4008 )
251+ )
252+ )
253+ ) .
254+ result ( function ( response ) {
255+ //console.log(JSON.stringify(response, null, 2));
256+ response . length . should . equal ( 1 ) ;
257+ response [ 0 ] . content . title . should . equal ( 'cross_pole' ) ;
258+ done ( ) ;
259+ } , done ) ;
260+ } ) ;
261+
229262 it ( 'should do geo property pair query with box in json doc' , function ( done ) {
230263 dbWriter . documents . query (
231264 q . where (
0 commit comments