Controller-Side: 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; InMemoryFeatureLayer inmLayer = new InMemoryFeatureLayer(); inmLayer.InternalFeatures.Add(new Feature(0, 0)); inmLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; inmLayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.Capital1; LayerOverlay layeroverlay = new LayerOverlay("MarkerOverlay"); layeroverlay.Layers.Add("name", inmLayer); map.CustomOverlays.Add(layeroverlay); return View(map); } [MapActionFilter] public void ClickEvent(Map map, GeoCollection args) { (((LayerOverlay)map.CustomOverlays["MarkerOverlay"]).Layers["name"] as InMemoryFeatureLayer).InternalFeatures.Clear(); } View-Side: @using ThinkGeo.MapSuite.Core; @using ThinkGeo.MapSuite.MvcEdition; @model ThinkGeo.MapSuite.MvcEdition.Map
@{ Html.ThinkGeo().Map(Model) .OnClientClick("mapClick").Render(); }