Hi , I'm trying to read the tables from MS SQL, I copied the code from here
websamples.thinkgeo.com/
to get the tables into ms sql i used blog.sqlauthority.com/2010/03/30/sql-server-world-shapefile-download-and-upload-to-database-spatial-database/ and set the parameters in geometry without srid, geometry name is geom and id name is id and spartial index, and also changed .aspx into visible in the aspx file
I modified the connectionstring to fit
but once I run the webpage I get an empty map with only the zoom panel , i know it finds the database becuase if i enter incorrect values it gives an exception
maybe i get wrong featureIdColumn , isnt it geom?
here is my code:
map.MapUnit = GeographyUnit.DecimalDegree;
string connectString = "User ID=testuser;Password=testpassword;Data Source=server2;Initial Catalog=ThinkGeo;";
MsSql2008FeatureLayer world = new MsSql2008FeatureLayer(connectString, "cntry02","geom");
world.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1; //AreaStyles.Country1;
world.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.Highway1;
world.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
map.StaticOverlay.Layers.Add("Sql2008Layer", world);
Does anyone got an idea what I'm doing wrong ?