No Geo Points Found in rectangular Area | JS

Hey Guys,

I’m currently experiencing some trouble with the “Search in Rectangular Area” function.
The result is always empty although there are Geopoints within my google maps view port.

My Code looks like this:


function getEventsInArea(){
   var north = map.getBounds().getNorthEast().lat();
   var east = map.getBounds().getNorthEast().lng();
   var south = map.getBounds().getSouthWest().lat();
   var west = map.getBounds().getSouthWest().lng();
    
   var geoQuery = {
        searchRectangle: [north,east,south,west],
        categories: ["fussball"],
        pageSize: 50,
        offset: 50
    }
    var result = Backendless.Geo.find(geoQuery);
} 

When the Map is initialized I call the upper function and get an empty array as result.

I’m sure that the geo points are within this viewport. I already tested with different zoom level’s to be sure…

Have you tried inspecting the “result” variable using developer tools built into browser?

Mark

Sure:

Object {data: Array[0], totalObjects: 0, offset: 50}
<ol>data:Array[0]
length:0
__proto__:Array[0]
offset:50
totalObjects:0

</ol>__proto__:Object


I just tried the sample Data and it worked…

Try JS code generation and see if it works there. The code gen creates a complete JS application.

Alright there it works with my geo category…

There is also code shown right there in the generated app. Compare it with your code.