public ActionResult Map() { var mapRepository = new MapRepository(); var map = mapRepository.GetById(1); return Json(map,JsonRequestBehavior.AllowGet); }
// // GET: /Map/ public ActionResult Index(int stationID) { var mapRepository = new MapRepository(); ServiceClient myService = new ServiceClient(); myService.ClientCredentials.Windows.ClientCredential.UserName = "******"; myService.ClientCredentials.Windows.ClientCredential.Password = "******"; var stations = myService.GetAllStations().Where(s=>s.StationID==stationID); // var map = mapRepository.GetById(stationID); GoogleMaps.Locations = stations.ToArray(); ViewBag.Map = (GoogleMaps.Webpage); return View(); }