I've come upon some strange behaviour, possibly a bug.
I have a feature (multipolygon or multilinestring) 'feat' in my map's TrackOverlay TrackShapeLayer. feat.Tag has been assigned a string that's useful to me.
I want the user to be able to edit this feature, so after the user presses a 'edit feature' button I do the following:
The user can now move the feature around, rotate, resize, etc. Then when pressing the 'edit feature' button again, the feature is put back into the TrackShapeLayer.
In most cases, feat still has its Tag when I add it to the TrackShapeLayer. However, if the user has at some point while editing added a vertex by clicking on the line between two existing vertices, feat.Tag is set to null.
Why is this, and how can I stop my Tag from getting lost?
I guess you are right. It was a bug in EditOverlay and thanks for reporting the issue. Now, it have been fixed in latest version(7.0.0.144 or 7.0.144.0). (PS: The latest version is still packaging, please waiting several hours.)
If the issue persists, please let us know. Thank, Johnny
I’m really glad you responded so quickly, and would like to accept your answer to this and my other question, but the latest version in my portal is still DesktopEditionFull7.0.0.142DllPackage.zip. Am I looking in the wrong place?
Sorry we just modified in the development version. Now, please get the 7.0.0.156 or 7.0.156.0 to fix it. PS: Recently, the new dll package might be delayed, would you please wait for another days?
Yes we can find the tag missing with the codes in the CustomEditInteractiveOverlay class, please following the below codes on the ResizeFeatureCore method: protected override Feature ResizeFeatureCore(Feature sourceFeature, PointShape sourceControlPoint, PointShape targetControlPoint) { // Override the base method and modify the logic for resizing if the shape is the "custom" if (sourceFeature.ColumnValues.ContainsKey("Edit") && sourceFeature.ColumnValues["Edit"] == "rectangle") { PolygonShape polygonShape = sourceFeature.GetShape() as PolygonShape;
if (polygonShape != null) { // If the rectangle is horizontal or vertical, it will use the custom method. if (string.Equals(polygonShape.GetBoundingBox().GetWellKnownText(), polygonShape.GetWellKnownText())) { int fixedPointIndex = GetFixedPointIndex(polygonShape, sourceControlPoint);
PointShape fixedPointShape = new PointShape(polygonShape.OuterRing.Vertices[fixedPointIndex]);
RectangleShape newRectangleShape = new LineShape(new Vertex[] { new Vertex(fixedPointShape), new Vertex(targetControlPoint) }).GetBoundingBox();