ThinkGeo.com    |     Documentation    |     Premium Support

V12.1 - control points in EditInteractiveOverlay

Hi,

in V9 it was possible to determine if a control point in the EditInteractiveOverlay is currently being dragged by code like this:

controlPoint.ColumnValues["state"] == "selected"

How can I determine this in V12 as there is no column value with the name “state” anymore?
Thank you.

Best regards,
Peter

Thanks Peter,
Could you attach more code to help us understand why we need get the status of the control point. The control point is a temporary point. after the drag complete it will release.

If we want to do some thing for the control point we could use the following event to control the selected point.

map.EditOverlay.ControlPointSelected += EditOverlay_ControlPointSelected;
map.EditOverlay.ControlPointSelecting += EditOverlay_ControlPointSelecting;

Thanks

Frank

Hello Frank,

thank you for your answer.

For the old version of MapSuite you had a sample on how it can be possible to make a moved vertex snap onto existing vertices. And to make it visible which vertex is currently dragged and if it will snap to another vertex you had to overwrite the DrawTileCore method in the EditInteractiveOverlay to change the display (e.g. color) of the currently dragged vertex.

The code looks like this:

Collection<Feature> controlPoints = this.ExistingControlPointsLayer.FeatureSource.GetAllFeatures(ReturningColumnsType.AllColumns);

//Loops through the control points.
foreach (Feature feature in controlPoints)
{
      //Looks at the value of "state" to draw the control point as dragged or not.                    
      if (feature.ColumnValues["state"] != "selected")
      {
            //draw differently when dragged
      }
}

I have not found a similar sample for v12 yet, do you possibly have suggestion for me?
I will try to facilitate the event you mentioned but like to ask nevertheless.

Thank you.

Peter