Beispiel #1
0
        void HandleMapButtonClick(object sender, StreetViewPanorama.StreetViewPanoramaClickEventArgs e)
        {
            var stations = pronto.LastStations;

            if (stations == null || currentShownID == -1)
            {
                return;
            }

            var stationIndex = Array.FindIndex(stations, s => s.Id == currentShownID);

            if (stationIndex == -1)
            {
                return;
            }
            var station = stations[stationIndex];

            var data = new Dictionary <string, string>();

            data.Add("Station", station.Name);
            Xamarin.Insights.Track("Navigate to Station", data);

            var location = station.GeoUrl;
            var uri      = Android.Net.Uri.Parse(location);
            var intent   = new Intent(Intent.ActionView, uri);

            StartActivity(intent);
        }
        void HandleMapButtonClick(object sender, StreetViewPanorama.StreetViewPanoramaClickEventArgs e)
        {
            var stations = hubway.LastStations;

            if (stations == null || currentShownID == -1)
            {
                return;
            }

            var stationIndex = Array.FindIndex(stations, s => s.Id == currentShownID);

            if (stationIndex == -1)
            {
                return;
            }
            var station  = stations [stationIndex];
            var location = station.GeoUrl;
            var uri      = Android.Net.Uri.Parse(location);
            var intent   = new Intent(Intent.ActionView, uri);

            StartActivity(intent);
        }