We have it on our map where the user can edit the vertex of lines, and polygons. They have requested that we make it so the vertex can snap to a nearby vertex. I downloaded the samples, but every one of them have it so that the tolerance overlay are calculated during the load and displayed when the testform comes up. I want my tolerance rings to come up when they click on the vertex they want to move like in the mapsuite GIS editor. Does someone have any sample code that would be of use to help me in my efforts? All the samples don’t perform like the GIS Editor.
Vertex Tollerance Question
Hi Jayce,
Please try the sample wiki.thinkgeo.com/wiki/Map_Suite_Desktop_Edition_All_Samples#Snap_To_Layer and then change the code as following:
1. comment the line 159-179 in "SnapToLayerEditInteractiveOverlay.cs".
2. In "TestForm.cs" file:
Change
snapToLayerEditInteractiveOverlay.DraggedControlPointStyle
= new PointStyle(PointSymbolType.Circle,
new GeoSolidBrush(GeoColor.StandardColors.Red),
new GeoPen(GeoColor.StandardColors.Orange,
2), 10);
to
snapToLayerEditInteractiveOverlay.DraggedControlPointStyle
= new PointStyle(PointSymbolType.Circle, new GeoSolidBrush(GeoColor.StandardColors.Red), new GeoPen(GeoColor.StandardColors.Orange, tolerance), 10);
Hope it helps and please let us know if it's not fit for you.
Thanks,
The change only produced an error in the code, and there was no overload that allowed it. Is there anything else that needed changed?
The variable you changed in the width of that GeoPen.
Hi Jayce,
We noticed your colleagues submit a similar issue in ticket system, is it a same issue? If yes, please we have replied it by creating a sample, check it on ticket system.
In case others have the same issue, I also attached it here.
Thanks,
Troy
001_SnapToLayer.zip (299 KB)