Progress Event in RequestShapeAsync Not Triggering

2017
1
04-25-2016 03:58 AM
EdL
by
New Contributor II

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.

0 Kudos
1 Reply
EdL
by
New Contributor II

I suppose the progress event does not trigger on mouse drag when doing rotation/scaling/translation.

It triggers only on mouse release.

0 Kudos