Hello. I have two separate issues regarding the Map Click postback event. The first is in regards to the Edit Layer, and the second is in regards to a MSSQL2008 Layer.
- Edit Layer - In the Page Load event I am moving a feature into the Edit Layer. The client draws the edit feature just fine and allows the feature to be changed. The problem, however, occurs on the postback. I get the following error:
Line: 4724
Char: 21
Error: Sys.WebForms.PageRequestManagerServerErrorException: There was an error deserializing the object of type
ThinkGeo.MapSuite.WebEdition.JsonFeatureCollection. End element'Value' from namespace " expected. Found element 'Key' from namespace."
If I remove the edit feature first (using cancellastfeature) and then add a new one I have no problem on the postback.
- MSSQL2008 Layer - I have a MSSQL2008 layer on which I want to query the feature which the user clicks. I am using the GetFeaturesContaining method of the QueryTools object and am getting the following error:
System.Data.SqlClient.SqlException: A .NET Framework error occurred during execution of user-defined routine or aggregate "geometry": System.FormatException: 24305: The Polygon input is not valid because the ring does not have enough distinct points. Each ring of a polygon must contain at least three distinct points. System.FormatException: at Microsoft.SqlServer.Types.Validator.Execute(Transition transition) at Microsoft.SqlServer.Types.Validator.EndFigure() at Microsoft.SqlServer.Types.ForwardingGeoDataSink.EndFigure() at Microsoft.SqlServer.Types.OpenGisWkbReader.ReadLinearRing(ByteOrder byteOrder, FigureAttributes attributes, UInt32 ringNumber) at Microsoft.SqlServer.Types.OpenGisWkbReader.ParseWkbPolygonWithoutHeader(ByteOrder byteOrder) at Microsoft.SqlServer.Types.OpenGisWkbReader.ParseWkb(OpenGisType type) at Microsoft.SqlServer.Types.OpenGisWkbReader.Read(OpenGisType type, Int32 srid) at Microsoft.SqlServer.Types.SqlGeometry.GeometryFromBinary(OpenGisType type, SqlBytes binary, Int32 srid) at Microsoft.SqlServer.Types.SqlGeometry.STGeomFromWKB(SqlBytes wkbGeometry, Int32 srid) . at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.HasMoreRows() at System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout) at System.Data.SqlClient.SqlDataReader.Read() at ThinkGeo.MapSuite.Core.MsSql2008FeatureSource.x278e6cfeb3a2b342(BaseShape x8c1dcba6678ab3e6, Int32 x733eadfaaf7df35a, IEnumerable`1 xb3da24dbcff0ab0a) at ThinkGeo.MapSuite.Core.MsSql2008FeatureSource.GetFeaturesInsideBoundingBoxCore(RectangleShape boundingBox, IEnumerable`1 returningColumnNames) at ThinkGeo.MapSuite.Core.FeatureSource.x693b0364c8825b80(BaseShape x8c1dcba6678ab3e6, IEnumerable`1 xb3da24dbcff0ab0a) at ThinkGeo.MapSuite.Core.FeatureSource.SpatialQueryCore(BaseShape targetShape, QueryType queryType, IEnumerable`1 returningColumnNames) at ThinkGeo.MapSuite.Core.FeatureSource.SpatialQuery(BaseShape targetShape, QueryType queryType, IEnumerable`1 returningColumnNames) at ThinkGeo.MapSuite.Core.QueryTools.GetFeaturesContaining(BaseShape targetShape, IEnumerable`1 returningColumnNames) at _Default.Map1_Click(Object sender, MapClickedEventArgs e)
As a separate issue concerning MSSQL2008 layers, have you noticed that these layers tend to load slower than Shapefile layers? Are there any particular indices that we need to include to ensure optimal performance regarding MSSQL2008 layers? If you have a Shapefile layer and a MSSQL2008 layer with the same features and tabular data residing on the same computer, which one should perform better?
Thanks for all your help. I'm really enjoying working with this product.
Binu