hi… I am trying to display map from sql server 2008 but it displays only “Eval 49 days” text it doesn’t display the map as per my database which is related to country map.
Not displaying map from the sql server 2008 database
Hi Samir,
Thanks for your post, and welcome to MapSuite World. There are three main reasons for this problem
the first is that "map.MapUnit" is wrongly set, for example if the data in your DB is meter, but the map.MapUnit = GeographyUnit.DecimalDegree, then the shapes will not be shown.
The second is that map.CurrentExtent is wrongly set, would you please try to use following code to get the right extent:
msSql2008FeatureLayer.Open();
map.CurrentExtent = msSql2008FeatureLayer.GetBoundingBox();
The third is that the style is wrongly set, for example, if the data in the DB is lineshape then code like the following is needed
msSql2008FeatureLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
msSql2008FeatureLayer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.Canal1;
If these three reasons are not applicable for your case, would you please send us your data for a further test, you could upload it or send it to forumsupport@thinkgeo.com if it is confidential?
Waiting for your further inforamtion
Summer
hi… I was already created mvc application as per your example but I can’t display the map as per my data stored with sql server 2008. here is my code
Dim connectString As String = “Server=PC;Database=spatial;User ID=abc;Password=123;”
Dim sql2008Layer As MsSql2008FeatureLayer = New MsSql2008FeatureLayer(connectString, “cntry02”, “recid”)
sql2008Layer.Open()
Dim v = sql2008Layer.Validate
sql2008Layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1
sql2008Layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20
overlay.Layer(“Sql2008Layer”, sql2008Layer)
plz, reply as early as possible.
Thanks
Hi Samir,
Thanks for your further information, seems the code didn’t have any problem, would you please provide us a backup of you data for a further test? Once we get the data, we will debug it immediately.
Waiting for your further information
Summer