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.CurrentExtent = new RectangleShape(-125, 72, 50, -46); map.MapUnit = GeographyUnit.DecimalDegree; WorldMapKitWmsWebOverlay worldMapKitOverlay = new WorldMapKitWmsWebOverlay("WorldMapKitOverlay"); map.CustomOverlays.Add(worldMapKitOverlay); InMemoryFeatureLayer inmLayer = new InMemoryFeatureLayer(); inmLayer.Name = "name"; LayerOverlay layeroverlay = new LayerOverlay("MarkerOverlay"); //layeroverlay.Layers.Add(inmLayer); layeroverlay.Layers.Add("name", inmLayer); map.CustomOverlays.Add(layeroverlay); return View(map); } [MapActionFilter] public void ClickEvent(Map map, GeoCollection args) { PointShape position = new PointShape(Convert.ToDouble(args[0]), Convert.ToDouble(args[1])); LayerOverlay markerOverlay = (LayerOverlay)map.CustomOverlays["MarkerOverlay"]; InMemoryFeatureLayer inmLayer = markerOverlay.Layers["name"] as InMemoryFeatureLayer; }