//取消测算,移除附加图层 private void Edit_Calc_Cancle_Click(object sender, RoutedEventArgs e) { if (mAssistView != null) { this.MapGrid.Children.Remove(mAssistView); listLayer.Remove(mAssistView); } mAssistView = null; }
//测算面积 private void Edit_Calc_Area_Click(object sender, RoutedEventArgs e) { if (mAssistView != null && !mAssistView.GetAction().GetType().ToString().Equals(CalAreaAction.getType())) { MapGrid.Children.Remove(mAssistView); listLayer.Remove(mAssistView); mAssistView = null; } if (mAssistView == null) { mAssistView = new AssistView(new CalAreaAction()); MapGrid.Children.Add(mAssistView); listLayer.Add(mAssistView); } }