protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Map1.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.FromHtml("#E5E3DF")); Map1.MapUnit = GeographyUnit.DecimalDegree; WorldMapKitWmsWebOverlay worldMapKitOverlay = new WorldMapKitWmsWebOverlay("WorldMapKitOverlay"); Map1.CustomOverlays.Add(worldMapKitOverlay); string connectString = YourConnectionString; MsSql2008FeatureLayer PolygonLayer = new MsSql2008FeatureLayer(connectString, "YourTableName","FeatrueIdColumn"); PolygonLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = .....; PolygonLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; PolygonLayer.Open(); Map1.CurrentExtent = PolygonLayer.GetBoundingBox(); PolygonLayer.Close(); PolygonLayer.FeatureSource.Open(); Collection PolygonFeatures = PolygonLayer.FeatureSource.GetAllFeatures(ReturningColumnsType.AllColumns);//.GetAllFeatures(ReturningColumnsType.AllColumns); PolygonLayer.FeatureSource.Close(); Map1.HighlightOverlay.Features.Add(PolygonFeatures[0]); Map1.HighlightOverlay.Features.Add(PolygonFeatures[1]); Map1.HighlightOverlay.Style = Map1.HighlightOverlay.Style; Map1.HighlightOverlay.Click += new EventHandler(EventLayer_Click); } } protected void EventLayer_Click(object sender, HighlightFeatureOverlayClickEventArgs e) { CloudPopup popup; if (Map1.HighlightOverlay.Features[0].GetBoundingBox().Contains(e.Location)) { popup = new CloudPopup("Popup", e.Location, "This Polygon1"); popup.AutoSize = true; Map1.Popups.Add(popup); } if (Map1.HighlightOverlay.Features[1].GetBoundingBox().Contains(e.Location)) { popup = new CloudPopup("Popup", e.Location, "This Polygon2"); popup.AutoSize = true; Map1.Popups.Add(popup); } this.Title = "Title changed"; }