Hi,I have done the coding of my application again, but I'm still with the problem.Here's my new code:private Map myMap;
private GeometryService geometryService;
public MeasureArea(Map myMap)
{
this.myMap = myMap;
this.geometryService = new GeometryService("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer/");
this.geometryService.AreasAndLengthsCompleted += MeasureFinished;
}
public void Measuredraw(Graphic draw)
{
geometryService.AreasAndLengthsAsync(new List<Graphic>() { draw },
new List<Graphic>() { draw });
}
private void MeasureFinished(object sender, AreasAndLengthsEventArgs e)
{
Graphic draw = (e.UserState as List<Graphic>).First();
string area = string.Format("{0} km²", e.Results.Areas.First());
Graphic drawMeasureTextSymbol = new Graphic();
drawMeasureTextSymbol.Geometry = draw.Geometry.Extent.GetCenter();
drawMeasureTextSymbol.Symbol = new TextSymbol()
{
Text = area.ToString(),
FontSize = 16,
Foreground = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.Blue)
};
(this.myMap.Layers["MedirGraphicLayer"] as GraphicsLayer).ClearGraphics();
(this.myMap.Layers["MedirGraphicLayer"] as GraphicsLayer).Graphics.Add(draw);
(this.myMap.Layers["MedirGraphicLayer"] as GraphicsLayer).Graphics.Add(drawMeasureTextSymbol);
}And this is the result:[ATTACH=CONFIG]18229[/ATTACH]If I change the method parameters to the code below, the value returned is the same.geometryService.AreasAndLengthsAsync(new List<Graphic>() { draw }, LinearUnit.Meter, LinearUnit.Meter, new List<Graphic>() { draw });