Hi,
I have a message error (ie MoveVertex_Error.txt) when I try to move a special vertex.
Step 1 :
Draw a polygon as in a screen shot (ie. MoveVertex_error.jpg) (locate the first point of the hole). (projection is Lambert93)
Step 2 :
Edit the polygon and if you move the second point of the hole ==> Ok ; but if you move the first point of the hole ==> error)
I’m using the class SnapToLayerEditInteractiveOverlay but I edit using editoverlay, i have the same error.
Thanks for your help.
Regards.
Steph.
MoveVertex_Error.txt (5.23 KB)
MoveVertex_Error.jpg (19.9 KB)
001_SnapToLayerEditInteractiveOverlay.txt (12.8 KB)
Message error if move vertex in edit mode
Hi Steph,
Thanks for let us know the problem, it looks don’t related with your custom layer, because I have reproduced that by EditOverlay.
As below is my test code, I will try to solve that and please let me know if it don’t shows your issue.
private void WpfMap_Loaded(object sender, RoutedEventArgs e)
{
Map1.MapUnit = GeographyUnit.DecimalDegree;
Map1.TrackOverlay.TrackMode = TrackMode.None;
Collection<Vertex> vertexes = new Collection<Vertex>();
vertexes.Add(new Vertex(0, 50));
vertexes.Add(new Vertex(50, 50));
vertexes.Add(new Vertex(50, 0));
vertexes.Add(new Vertex(0, 50));
RingShape outerRing = new RingShape(vertexes);
Collection<Vertex> vertexes2 = new Collection<Vertex>();
vertexes2.Add(new Vertex(15, 45));
vertexes2.Add(new Vertex(45, 45));
vertexes2.Add(new Vertex(45, 15));
vertexes2.Add(new Vertex(15, 45));
RingShape innerRing = new RingShape(vertexes2);
PolygonShape polygon = new PolygonShape(outerRing);
polygon.InnerRings.Add(innerRing);
Map1.EditOverlay.EditShapesLayer.InternalFeatures.Add(new Feature(polygon));
RectangleShape rect = polygon.GetBoundingBox();
rect.ScaleUp(100);
Map1.CurrentExtent = rect;
Map1.Refresh();
}
Regards,
Don
Hi Don,
Thanks but I tested what you suggested and that it does not work.
Initial code when I add the feature to the editoverlay.
foreach (Feature feature in InMemFeatureLayerEnCours.InternalFeatures)
{
WpfMap.EditOverlay.EditShapesLayer.InternalFeatures.Add(feature.Id, feature);
}
WpfMap.EditOverlay.CalculateAllControlPoints();
Code modified after your post :
foreach (Feature feature in InMemFeatureLayerEnCours.InternalFeatures)
{
WpfMap.EditOverlay.EditShapesLayer.InternalFeatures.Add(feature.Id, new Feature(construireFeature(feature)));
}
private PolygonShape construireFeature(Feature ft)
{
PolygonShape p = (PolygonShape)ft.GetShape();
Collection<Vertex> vOut = p.OuterRing.Vertices;
RingShape rOut = new RingShape(vOut);
Collection<Vertex> vInt = p.InnerRings.First().Vertices;
RingShape rIn = new RingShape(vInt);
PolygonShape pFinal = new PolygonShape(rOut);
pFinal.InnerRings.Add(rIn);
return pFinal;
}
And I have the same message error.
Thanks.
Regards.
Stéphanie.
Hi Steph,
Sorry we are still working for that and this issue haven’t been fixed.
We will update status if we get any progress.
Regards,
Don
Hi Don,
Thanks.
Is this problem requires opening a ticket?
Regards.
Steph.
Hi Steph,
Don’t worry about that this time, I have created inner issue for that.
Sorry our developer haven’t responded update about it, I have asked them for the progress today.
Regards,
Don
Thanks Don.
Regards.
Steph.
Hi Steph,
Our developer said this exception have been fixed, you can get this fix in 8.0.77.0 or higher version.
Please let me know whether that works for you.
Regards,
Don
Hi Don,
That works. Thanks.
Does this correction will be included in a version of dll production ?
Thanks.
Regards.
Steph.
Hi Steph,
The issue is fixed in our core dll, so all products should have been fixed.
Regards,
Don
Hi Don,
I tested with dev dll 8.0.77.0 ==> OK
I tested with prod dll 8.0.0.77 ==> PAS OK
I tested with prod dll 8.0.0.78 ==> PAS OK
Thanks.
Regards.
Steph.
Hi Steph,
Thanks to let as know that works for you.
Regards,
Don
Hi Don,
May be I misspoke but why this correction does not work with prod dll (8.0.0.77 ; 8.0.0.78) ?
This works with only dev dll (8.0.77.0) ?
Thanks.
Regards.
Steph.
Hi Steph,
Sorry we just fix that in development build at first, generally it will be synchronous to product build after some time when the change proved stable.
Today I think you need that in product branch now, so I have talked with our developers, they will move that to product build today.
So you can find that in 8.0.0.83 or higher version.
Regards,
Don