public ShowMapPage(Journey journey)
        {
            InitializeComponent();

            useStopNotStation = false;

            findEarliestDeparture = stop =>
            {
                foreach (var js in journey.JourneySegments)
                {
                    if (DataFeedClient.Basic.Stops.FindByIndex(js.SourceStopID).ParentStation.ID == stop.ParentStation.ID)
                    {
                        return(js.DepartureDateTime);
                    }

                    if (js is TripSegment)
                    {
                        foreach (var @is in (js as TripSegment).IntermediateStops)
                        {
                            if (DataFeedClient.Basic.Stops.FindByIndex(@is.StopID).ParentStation.ID == stop.ParentStation.ID)
                            {
                                return(@is.Arrival);
                            }
                        }
                    }

                    if (DataFeedClient.Basic.Stops.FindByIndex(js.TargetStopID).ParentStation.ID == stop.ParentStation.ID)
                    {
                        return(js.ArrivalDateTime);
                    }
                }

                throw new ArgumentException("Stop ID not found in the journey.");
            };

            Title = Settings.Localization.Map;

            var stops = journey.GetStops();

            SetMapScope(stops, false, true);

            DrawMarkers(stops);

            foreach (var js in journey.JourneySegments)
            {
                if (js is TripSegment)
                {
                    DrawPolyline(((TripSegment)js).GetStops(), ((TripSegment)js).LineColor);
                }
                else
                {
                    DrawPolyline(((FootpathSegment)js).GetStops(), CPColor.Gray);
                }
            }
        }