john.c.cartwright

Extent#intersects fails with extent crossing 180

Discussion created by john.c.cartwright on Jun 18, 2011
Hello All,

It seems to me that the following should work and it doesn't (v2.3).  Can someone please explain?

Thanks!

--john


        var polylineJson = {
            "paths":[[[-179.99,-89.99], [-179.99,89.99]]],
            "spatialReference":{"wkid":4326}
        };
        var antimeridian = new esri.geometry.Polyline(polylineJson);
        var bbox = new esri.geometry.Extent(175.0,-5.0,-175.0,5.0, new esri.SpatialReference({ wkid:4326 }));
        console.log(bbox.intersects(antimeridian));  //should be true but is false

Outcomes