Example #1
0
 void GetDirectionsButtonClick(object sender, RoutedEventArgs e)
 {
     var origin = GetOrigin();
     var destination = GetDestination();
     var directionSteps = GMapUtil.GetDirections(origin, destination);
     if (directionSteps != null && directionSteps.Steps.Count > 0)
     {
         if (_directionsControl != null)
             _directionsControl.Close();
         var height = FrameworkManager.Canvas.ActualHeight;
         var mapDirectionStepsView = new MapDirectionStepsView { Height = height-200 };
         mapDirectionStepsView.InitializeControl(FrameworkManager, 0, 0);
         mapDirectionStepsView.InitializeControlData(directionSteps);
         _directionsControl = mapDirectionStepsView;
         _directionsControl.Closed += DirectionsControlClosed;
         GetDirections();
     }
 }
Example #2
0
 void DirectionsControlClosed(object sender, EventArgs e)
 {
     _directionsControl = null;
 }