Example #1
0
 public DragInteractiveOverlayAdvanced()
     : base()
 {
     ExistingControlPointsLayer.Open();
     ExistingControlPointsLayer.Columns.Add(new FeatureSourceColumn("nodetype"));
     ExistingControlPointsLayer.Close();
 }
Example #2
0
        public SelectVerticesEditInteractiveOverlay()
            : base()
        {
            this.CanAddVertex    = false;
            this.CanDrag         = true;
            this.CanRemoveVertex = false;
            this.CanResize       = false;
            this.CanRotate       = false;

            ExistingControlPointsLayer.Open();
            ExistingControlPointsLayer.Columns.Add(new FeatureSourceColumn("IsSelected"));
            ExistingControlPointsLayer.Close();

            existingFeatures = new Collection <Feature>();
        }
Example #3
0
        //Overrides the DrawCore function.
        protected override void DrawCore(GeoCanvas canvas)
        {
            if (EditShapesLayer.InternalFeatures.Count > 1)
            {
                throw new NotImplementedException("Only allow one shape to be editing.");
            }

            //Draws the Edit Shapes as default.
            Collection <SimpleCandidate> labelsInAllLayers = new Collection <SimpleCandidate>();

            EditShapesLayer.Open();
            EditShapesLayer.Draw(canvas, labelsInAllLayers);
            canvas.Flush();

            ExistingControlPointsLayer.Open();
            Collection <Feature> ExistingControlPoints = ExistingControlPointsLayer.QueryTools.GetAllFeatures(new string[1] {
                "IsSelected"
            });

            ExistingControlPointsLayer.Close();

            //Loops thru the control points.
            for (int i = ExistingControlPoints.Count - 1; i >= 0; i--)
            {
                Feature feature = ExistingControlPoints[i];
                if (feature.ColumnValues.ContainsKey("IsSelected") && feature.ColumnValues["IsSelected"] == "true")
                {
                    Feature[] features = new Feature[1] {
                        feature
                    };
                    selectedControlPointStyle.Draw(features, canvas, labelsInAllLayers, labelsInAllLayers);
                }
                else
                {
                    Feature[] features = new Feature[1] {
                        feature
                    };
                    controlPointStyle.Draw(features, canvas, labelsInAllLayers, labelsInAllLayers);
                }
            }
        }
Example #4
0
        //Overrides the DrawCore function.
        protected override void DrawCore(GeoCanvas canvas)
        {
            //Draws the Edit Shapes as default.
            Collection <SimpleCandidate> labelsInAllLayers = new Collection <SimpleCandidate>();

            EditShapesLayer.Open();
            EditShapesLayer.Draw(canvas, labelsInAllLayers);
            canvas.Flush();

            //Gets the control points and draw its features according to the value of "IsSelected" column.
            this.ExistingControlPointsLayer.Open();
            Collection <Feature> ExistingControlPoints = this.ExistingControlPointsLayer.QueryTools.GetAllFeatures(new string[1] {
                "IsSelected"
            });

            ExistingControlPointsLayer.Close();

            //Loops thru the control points features and check for the value of "IsSelected" collumn.
            foreach (Feature feature in ExistingControlPoints)
            {
                if (feature.ColumnValues.ContainsKey("IsSelected") && feature.ColumnValues["IsSelected"] == "true")
                {
                    Feature[] features = new Feature[1] {
                        feature
                    };
                    selectedControlPointStyle.Draw(features, canvas, labelsInAllLayers, labelsInAllLayers);
                }
                else
                {
                    Feature[] features = new Feature[1] {
                        feature
                    };
                    controlPointStyle.Draw(features, canvas, labelsInAllLayers, labelsInAllLayers);
                }
            }
        }