Ejemplo n.º 1
0
        void OnFoundResult(object sender, EventArgs e)
        {
            GeocodingResult result = (GeocodingResult)sender;

            if (result == null)
            {
                Alert("Couldn't find any addresses. Are you sure you have downloaded the region you're trying to reverse geocode?");
                return;
            }

            string title        = "";
            string description  = result.ToString();
            bool   goToPosition = false;

            var source = (ContentView as ReverseGeocodingView).ObjectSource;

            source.ShowResult(ContentView.MapView, result, title, description, goToPosition);
        }
        void OnGeocodingResultFound(object sender, EventArgs e)
        {
            GeocodingResult result = (GeocodingResult)sender;

            if (result == null)
            {
                RunOnUiThread(delegate
                {
                    string text = "Couldn't find any addresses. Please try again";
                    ContentView.Banner.Show(text);
                });
                return;
            }

            string title        = "";
            string description  = result.ToString();
            bool   goToPosition = false;

            var view = ContentView as BaseGeocodingView;

            view.GeocodingSource.ShowResult(ContentView.MapView, result, title, description, goToPosition);
        }
 private static void DeliverResultToReceiver(GeocodingResult resultCode, string message)
 {
     Console.WriteLine("{0} - {1}", resultCode.ToString(), message);
 }
 private static void DeliverResultToReceiver(GeocodingResult resultCode, List<string> addresses)
 {
     foreach (var item in addresses)
     {
         Console.WriteLine("{0} - {1}", resultCode.ToString(), item);
     }
 }