hi all,my map is in WKID 102100. the units of that spatial reference are meters, i believe. my area of interest is the south central US. when i measure using a Geometry Service, the returned meters seem to be off by quite a bit. measuring a straight line from lafayette, la to baton rouge returns 101,000 meters. it should be closer to about 87,000 meters. i don't project to a new spatial reference before measuring since the distance units are already meters. is there a different step i'm missing or am i doing something else wrong?btw, i'm using the old fashioned Geometry service method of measuring because customizing the persistence behavior of the Action method of measuring isn't possible.Private Sub MyDrawObject_DrawComplete(ByVal sender As Object, ByVal args As DrawEventArgs)
Dim geometryService As New Tasks.GeometryService(_ServerName & "/ArcGIS/rest/services/Geometry/GeometryServer")
Dim graphic As New Graphic
Select Case _measuremode
Case 2 'Polyline
Dim polyline As ESRI.ArcGIS.Client.Geometry.Polyline = TryCast(args.Geometry, ESRI.ArcGIS.Client.Geometry.Polyline)
polyline.SpatialReference = Map.SpatialReference '102100
graphic.Symbol = DefaultLineSymbol
graphic.Geometry = polyline
AddHandler geometryService.LengthsCompleted, AddressOf GeometryService_LengthsCompleted
Case 3 'Polygon
Dim polygon As ESRI.ArcGIS.Client.Geometry.Polygon = TryCast(args.Geometry, ESRI.ArcGIS.Client.Geometry.Polygon)
polygon.SpatialReference = Map.SpatialReference
graphic.Symbol = DefaultFillSymbol
graphic.Geometry = polygon
AddHandler geometryService.AreasAndLengthsCompleted, AddressOf GeometryService_AreasAndLengthsCompleted
End Select
Dim graphicsLayer As GraphicsLayer = TryCast(Map.Layers("MeasureGraphicsLayer"), GraphicsLayer)
graphicsLayer.Graphics.Add(graphic)
Dim graphicList As New List(Of Graphic)()
graphicList.Add(graphic)
Select Case _measuremode
Case 2 'Polyline
geometryService.LengthsAsync(graphicList)
Case 3 'Polygon
geometryService.AreasAndLengthsAsync(graphicList)
End Select
End Sub
Private Sub GeometryService_LengthsCompleted(ByVal sender As Object, ByVal args As ESRI.ArcGIS.Client.Tasks.LengthsEventArgs)
_meters = args.Results(0)
_kms = args.Results(0) * 0.001
DisplayLinearResult()
End Sub
lance