private static void OnRouteResultChanged(Map map, FootballManager.Referee.Presentation.BingServices.RouteResult oldValue, FootballManager.Referee.Presentation.BingServices.RouteResult newValue)
        {
            MapPolyline routeLine = new MapPolyline();

            routeLine.Locations       = new LocationCollection();
            routeLine.Opacity         = 0.65;
            routeLine.Stroke          = new SolidColorBrush(Colors.Blue);
            routeLine.StrokeThickness = 5.0;

            foreach (FootballManager.Referee.Presentation.BingServices.Location loc in newValue.RoutePath.Points)
            {
                routeLine.Locations.Add(new Location(loc.Latitude, loc.Longitude));
            }

            var routeLineLayer = GetRouteLineLayer(map);

            if (routeLineLayer == null)
            {
                routeLineLayer = new MapLayer();
                SetRouteLineLayer(map, routeLineLayer);
            }

            routeLineLayer.Children.Clear();
            routeLineLayer.Children.Add(routeLine);

            //Set the map view
            LocationRect rect = new LocationRect(routeLine.Locations[0], routeLine.Locations[routeLine.Locations.Count - 1]);

            map.SetView(rect);
        }
 public static void SetRouteResult(DependencyObject target, FootballManager.Referee.Presentation.BingServices.RouteResult value)
 {
     target.SetValue(RouteResultProperty, value);
 }