Example #1
0
        public void ShowRouteFrom(Place from, Place to)
        {
            if(_Routes.Any())
            {
                _MapView.RemoveAnnotations(_MapView.Annotations as MKAnnotation[]);
                _Routes = new CLLocation[] { };
            }

            var placeMarkFrom = new PlaceMark(from);
            var placeMarkTo = new PlaceMark(to);

            CalculateRoutesAction.BeginInvoke(placeMarkFrom, placeMarkTo, (ar) =>
            {
                CalculateRoutesAction.EndInvoke(ar);
                UpdateMap(placeMarkFrom, placeMarkTo);

            }, null);
        }
Example #2
0
 public PlaceMark(Place place)
 {
     this.Place = place;
     this.Coordinate = new CLLocationCoordinate2D(place.Latitude, place.Longitude);
 }