i have a tools created with sdk for WPF 10.2.3.
Now, I noticed a problem. when I try to calculate the length of a polyline, the result is incorrect.
I drawing a long polyline 100 meters but, calculation, it is long 139.(see image)
The plane coordinates are incorrect, consistent with the calculations.
here is the code for the calculation of the coordinates:
Dim screenPoint As System.Windows.Point = e.GetPosition(MyMap)
Dim pGeo As ESRI.ArcGIS.Client.Geometry.MapPoint = _mercator.ToGeographic(MyMap.ScreenToMap(screenPoint))
PlanCoordsTextBlock.Text = String.Format("Geo Coords: X = {0:0.0000}; Y = {1:0.0000}", pGeo.X, pGeo.Y)
Dim mapPoint As ESRI.ArcGIS.Client.Geometry.MapPoint = MyMap.ScreenToMap(screenPoint)
If MyMap.WrapAroundIsActive Then
mapPoint = TryCast(ESRI.ArcGIS.Client.Geometry.Geometry.NormalizeCentralMeridian(mapPoint), ESRI.ArcGIS.Client.Geometry.MapPoint)
End If
If Not (IsNothing(mapPoint)) Then PlanCoordsTextBlock.Text += vbCrLf + String.Format("Plan Coords: X = {0:0.000}; Y = {1:0.000}", mapPoint.X, mapPoint.Y)
is a problem of spatial reference?
thanks