Hi,
I am trying to display a layer from a sql server 2008 db. The layer is the cntry02.shp that comes with the samples and I imported it using Shape2Sql program and set the srid to 4326. However, when I run the map I get a completely blank map. I have done a count and I get the same count as the number of records in the db.
This is my code snippet:
Map1.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.FromHtml("#E5E3DF"));
Map1.MapUnit = GeographyUnit.DecimalDegree;
string connectString = "Data Source=xxx.xxx.xxx.xxx;Initial Catalog=xxxxx;User Id=xx;Password=xxx;";
MsSql2008FeatureLayer sql2008Layer = new MsSql2008FeatureLayer(connectString, "cntry02", "id_col");
sql2008Layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1;
sql2008Layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
sql2008Layer.Srid = 4326;
LayerOverlay worldOverlay = new LayerOverlay("WorldOverlay");
worldOverlay.Layers.Add(sql2008Layer);
worldOverlay.Name = "ThinkGeo Map";
Map1.CustomOverlays.Add(worldOverlay);
Map1.SyncClientZoomLevels(sql2008Layer.ZoomLevelSet);