We have recently included creating inner rings into the map, and got it working… but we are now trying to edit the function that controlled editing the vertices of a polygon and then saving it with the new vertices.
Right now we’re getting the vertices of the selected polgyon to edit by using…
Dim myshape As New Collection(Of Feature)
For i As Integer = 0 To LexusMap.EditOverlay.ExistingControlPointsLayer.InternalFeatures.Count - 1
myshape.Add(LexusMap.EditOverlay.ExistingControlPointsLayer.InternalFeatures(i))
Next
The problem sits that the InternalFeatures(i) lists all the vertices in an array with no way to tell if it’s part of the outer or inner ring. Is there a sample, or words of advice on how to change the vertices of a polygon on the map if it has both outer and inner rings?
With the current way it sits, this is what happens before, and then after.
(BEFORE)
(During Edit)
(After)
Editing a polygons vertices when it has an inner ring
Hi Tim,
I am sorry, it looks we cannot know which control vertex for inner line and which for outer line.
But I think we can do a workaround for that, after you call
winformsMap1.EditOverlay.CalculateAllControlPoints();
You can get all the control points from the DragControlPointsLayer, RotateControlPointsLayer, ResizeControlPointsLayer and ExistingControlPointsLayer.
Please get the control vertex from them, compare with your original shape and add column value for them, this can let you know which vertex belong to outer ring or inner ring.
Regards,
Don