Esempio n. 1
0
        public async Task <ActionResult> Process(GeoModel model)
        {
            var result = await _placeIdService.GetUniquePlaceId(new GeoCoordinate(model.Lat, model.Lon));

            if (result == null)
            {
                return(View("Index", new GeoModel {
                    Message = "Cant find Place ID"
                }));
            }

            var message = $"PlaceId = {result.CountryShortName}:{result.CityShortName}";

            return(View(
                       "Index",
                       new GeoModel {
                Message = message
            }));
        }
Esempio n. 2
0
        // GET: Test
        /// <summary>
        ///     Indexes this instance.
        /// </summary>
        /// <returns>ActionResult.</returns>
        public ActionResult Index()
        {
            var model = new GeoModel();

            return(View(model));
        }