Hello,I seem to be having problems getting GeometryTask's LengthsAsync call to respect measurement units.I'm currently building a measurement tool for a map viewer. The map I am working with right now is in 102100 Web Mercator. In the future, I will be projecting geometry into more suitable projections for doing measurement.No matter what I pass into LengthsAsync as my unit, I get back what appears to be meters. Why is this? The documentation for LengthsAsync says:lengthUnit
The length unit in which perimeters of polygons will be calculated. If unit is not specified, the units are derived from the Spatial Reference of the geometry.
My code:
GeometryService geometryService = new GeometryService(GeometryServiceUri);
geometryService.Failed += new EventHandler<TaskFailedEventArgs>(GeometryServiceMeasureSegment_Failed);
geometryService.LengthsCompleted += new EventHandler<LengthsEventArgs>(GeometryServiceMeasureSegment_Completed);
geometryService.LengthsAsync(geometryToMeasure, CurrentLengthUnit, true, null);
"CurrentLengthUnit" is a LinearUnit. Changing it between feet/kilometres/nautical miles/etc. has absolutely no effect on the resulting lengths.Is anybody able to shed some light on why this is? Does it have to do with the projection I'm currently using (102100)? Why is lengthUnit ignored?!?