Esempio n. 1
0
    public ActionResult Map()
    {

        var mapRepository = new MapRepository();

        var map = mapRepository.GetById(1);

        return Json(map,JsonRequestBehavior.AllowGet);

    }
Esempio n. 2
0
    //
    // 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();
    }