protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Map1.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.FromHtml("#E5E3DF")); Map1.CurrentExtent = new RectangleShape(-125, 72, 50, -46); Map1.MapUnit = GeographyUnit.DecimalDegree; LoadAMapFromMsSQL2008(); } } private void LoadAMapFromMsSQL2008() { MsSql2008FeatureLayer sql2008Layer = new MsSql2008FeatureLayer(connectString, "test", "Id"); sql2008Layer.CustomGeometryColumnName = "data"; sql2008Layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1; sql2008Layer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.Utility1; sql2008Layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; Map1.StaticOverlay.Layers.Add("Sql2008Layer", sql2008Layer); } protected void Button1_Click(object sender, EventArgs e) { Map1.CurrentExtent = new RectangleShape(-122.35999999987, 47.656001, -122.342999999877, 47.655999); }