public void DeselectAll() { SelectedPoint = new GISMapPoint(); GISMapPoint Dummy = new GISMapPoint(); UpdateColors(Dummy.pointrect); }
//used for plotting the points for drawing a polygon. public void AddPoint(Location MapPointLocation) { if (AddPolyPoint) { GISMapPoint GMPoint = new GISMapPoint(); GMPoint.PointLocation = MapPointLocation; surfacewindow.MainMap.PointLayer.AddChild(GMPoint.pointrect, MapPointLocation); MapPoints.Add(GMPoint); GMPoint.pointrect.TouchDown += new EventHandler <TouchEventArgs>(Point_TouchDown); } }
public void Point_TouchMove(Location MapPointLocation) { surfacewindow.MainMap.PointLayer.Children.Remove(SelectedPoint.pointrect); GISMapPoint NewPoint = new GISMapPoint(); NewPoint.PointLocation = MapPointLocation; MapPoints.RemoveAt(PointIndex); MapPoints.Insert(PointIndex, NewPoint); PointSelected = false; surfacewindow.MapPolygon.RemovePolygon(); surfacewindow.MapPolygon.AddPolygon(); }
public void UpdateColors(Rectangle pointrect) { for (int i = 0; i < MapPoints.Count; i++) { GISMapPoint test = MapPoints[i] as GISMapPoint; if (pointrect.Equals(test.pointrect) && pointrect != null) { test.pointrect.Stroke = new SolidColorBrush(Colors.Wheat); test.pointrect.Fill = new SolidColorBrush(Colors.Blue); } else // not the selected polygon... reset it's color { test.pointrect.Stroke = new SolidColorBrush(Colors.Gold); test.pointrect.Fill = new SolidColorBrush(Colors.Maroon); } } }
//used for plotting the points for drawing a polygon. public void AddPoint(Location MapPointLocation) { if (AddPolyPoint) { GISMapPoint GMPoint = new GISMapPoint(); GMPoint.PointLocation = MapPointLocation; surfacewindow.MainMap.PointLayer.AddChild(GMPoint.pointrect, MapPointLocation); MapPoints.Add(GMPoint); GMPoint.pointrect.TouchDown += new EventHandler<TouchEventArgs>(Point_TouchDown); } }