public JsonResult AutoSuggestCounty(string text)
 {
     AutocompletionRequest request = new AutocompletionRequest { Sensor = false,  Input = text };
     AutocompletionResponse response = _placesService.Autocomplete(request);
     IEnumerable<Prediction> predictions = response.Predictions.Where(prediction => prediction.Types.Any(type => type.Equals("administrative_area_level_2")));
     var projection = predictions.Select(prediction => new { suggestion = prediction.Terms.First().Value, description = prediction.Description });
     return Json(projection.ToList(), JsonRequestBehavior.AllowGet);
 }
 public JsonResult AutoSuggestCity(string text)
 {
     AutocompletionRequest request = new AutocompletionRequest { Sensor = false, Input = text };
     AutocompletionResponse response = _placesService.Autocomplete(request);
     IEnumerable<Prediction> predictions = response.Predictions.Where((prediction) => prediction.Types.Any((type) => type.Equals("sublocality") || type.Equals("locality")));
     var projection = predictions.Select(prediction => new { description = prediction.Description, suggestion = prediction.Terms.First().Value });
     return Json(projection.ToList(), JsonRequestBehavior.AllowGet);
 }
 public JsonResult AutoSuggestDestination(string text)
 {
     AutocompletionRequest request = new AutocompletionRequest { Sensor = false, Input = text, Types = "geocode" };
     AutocompletionResponse response = _placesService.Autocomplete(request);
     var projection = response.Predictions.Select(prediction => new { destination = prediction.Description, suggestion = prediction.Description });
     return Json(projection.ToList(), JsonRequestBehavior.AllowGet);
 }