Geometry Service Geodesic Distance/WrapAround180 Problem

Discussion created by mhoover12 on Dec 20, 2011
Latest reply on Dec 21, 2011 by mhoover12
We don't use the native Measurement widget and instead we have built our own, which leverages the GeometryService's Distance method, as seen below:

distParams.geometry1 = this.inputPoints[this.inputPoints.length - 2];
            distParams.geometry2 = this.inputPoints[this.inputPoints.length - 1];
            distParams.geodesic = true;

            //draw a polyline to connect the input points
            var polyline = new esri.geometry.Polyline(map.spatialReference);
            polyline.addPath([distParams.geometry1, distParams.geometry2]);
            this.measureGraphics.add(new esri.Graphic(polyline, polylineSymbol));
            //Calculate the geodesic distance 
            this.geometryService.distance(distParams, dojo.hitch(this, this.calculateDistance));

The problem is, with WrapAround180 set to true for the app, any measurement across the International Date Line returns "null" instead of a mileage.  For example, if I measure from LA to China, across the Pacific ocean, I get null.  However, if I measure from LA to China going the other direction, I get a value just fine.

Is this a bug or is there some workaround I need to allow the Distance task to work properly with WrapAround180?