AnsweredAssumed Answered

Progress Event in RequestShapeAsync Not Triggering

Question asked by WMELEE on Apr 25, 2016
Latest reply on Apr 27, 2016 by WMELEE

I have a simple function to draw a rectangle on a given mapview. Using the code below, I am not getting an event trigger on either <ProgressUpdated> or <ProgressOnProgressChanged>.

 

 

Code:

void StartDraw(MapView mapView)

{

     Progress<GeometryEditStatus> progress = new Progress<GeometryEditStatus>(this.ProgressUpdated);

     rogress.ProgressChanged += this.ProgressOnProgressChanged;

     var geom = await mapView.Editor.RequestShapeAsync(DrawShape.Rectangle, someSymbol, progress);

}

 

void ProgressUpdated(GeometryEditStatus status)

{ //breakpoint

    if (status != null)

    {

        var center = status.NewGeometry?.Extent?.GetCenter();

    }

}

 

void ProgressOnProgressChanged(object sender, GeometryEditStatus status)

{// breakpoint

    if (status != null)

    {

        var center = status.NewGeometry?.Extent?.GetCenter();

    }

}

 

 

Please advise.

Outcomes