public ActionResult AddAClickEvent() { Map map = new Map("Map1", new System.Web.UI.WebControls.Unit(100, System.Web.UI.WebControls.UnitType.Percentage), 510); map.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.FromHtml("#E5E3DF")); map.MapUnit = GeographyUnit.Meter; MultiGeoRasterLayer.BuildReferenceFile(@"..\..\data\referenceFile.txt", @"..\..\data"); MultiGeoRasterLayer multiGeoRasterLayer = new MultiGeoRasterLayer(@"..\..\data\referenceFile.txt"); multiGeoRasterLayer.Name = "foo"; LayerOverlay overlay = new LayerOverlay(); overlay.Layers.Add(multiGeoRasterLayer); multiGeoRasterLayer.Open(); map.CurrentExtent = multiGeoRasterLayer.GetBoundingBox(); map.CustomOverlays.Add(overlay); return View(map); }