I let my users to track a polygon line to measure a length. If they get close to their starting point, I assume they wanted to draw a polygon and know the area as well. Given a LineShape, how can I add the closing vertex and create a PolygonShape?
You are correct, while still I want to mention one thing is Ring Shape should be a closed area type shape, while line shape DONOT need to be closed, and it is line type shape.
Well, it was interesting. When I first tested that, I guess I got lucky, and my beginning and ending vertices were coincidental. And, when I added the resultant shape to the TrackOverlay.TrackShapeLayer, it drew as a polygon.
Later in the day, I could not get the resultant shapes to draw, however, the GetArea method returned a value that appears to be correct.
The light finally came on, and I added a closing vertex when original vertices were NOT coincidental, and then the shape draws.