Guys,
We recently upgraded to MS v 8.0.0.189 and immediately began to experience a bug when selecting features. This bug only occurs with layers in Sql Server, NOT shapefiles. Also selection seams to work fine when using a RectangleShape, but not with a PointShape.
Here is the line of code that causes the bug to occur:
oFeatures = moSqlLayer.QueryTools.GetFeaturesContaining(e.WorldLocation, ReturningColumnsType.AllColumns)
And here is the exception detail:
System.NotSupportedException was unhandled
HResult=-2146233067
Message=This feature is currently not supported.
Source=MapSuiteCore
StackTrace:
at ThinkGeo.MapSuite.Core.MsSql2008FeatureSource.4TM=(BaseShape 4jM=, QueryType 4zM=, IEnumerable`1 5DM=)
at ThinkGeo.MapSuite.Core.MsSql2008FeatureSource.SpatialQueryCore(BaseShape targetShape, QueryType queryType, IEnumerable`1 returningColumnNames)
at ThinkGeo.MapSuite.Core.FeatureSource.<>c__DisplayClass9.<spatialquery>b__8(IEnumerable`1 cns)
at ThinkGeo.MapSuite.Core.FeatureSource.sxU=(IEnumerable`1 tBU=, Func`2 tRU=, IEnumerable`1 thU=)
at ThinkGeo.MapSuite.Core.FeatureSource.SpatialQuery(BaseShape targetShape, QueryType queryType, IEnumerable`1 returningColumnNames, IEnumerable`1 filters)
at ThinkGeo.MapSuite.Core.FeatureSource.SpatialQuery(BaseShape targetShape, QueryType queryType, IEnumerable`1 returningColumnNames)
at ThinkGeo.MapSuite.Core.FeatureSource.SpatialQuery(BaseShape targetShape, QueryType queryType, ReturningColumnsType returningColumnNamesType)
at ThinkGeo.MapSuite.Core.QueryTools.GetFeaturesContaining(BaseShape targetShape, ReturningColumnsType returningColumnNamesType)
at BufferTest.Form1.WinformsMap1_MapClick(Object sender, MapClickWinformsMapEventArgs e) in C:\Users\steller\Documents\Visual Studio 2010\Projects\ThinkGeo\Selection Test\Form1.vb:line 42
at ThinkGeo.MapSuite.DesktopEdition.WinformsMap.OnMapClick(MapClickWinformsMapEventArgs e)
at ThinkGeo.MapSuite.DesktopEdition.WinformsMap.5xM=(InteractionArguments iBc=)
at ThinkGeo.MapSuite.DesktopEdition.WinformsMap.0hM=(Object dhc=, 0xU= dxc=)
at ThinkGeo.MapSuite.DesktopEdition.MouseEventAnalyzer.OnMouseEvent(0xU= e)
at ThinkGeo.MapSuite.DesktopEdition.MouseEventAnalyzer.txQ=(Double uBQ=, Double uRQ=, Double uhQ=, Double uxQ=)
at ThinkGeo.MapSuite.DesktopEdition.WinformsMap.fBc=(Object fRc=, MouseEventArgs fhc=)
at System.Windows.Forms.Control.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at BufferTest.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
I have attached a sample project. You will have to alter it to connect to your data source and also provide the correct Unit of Measure. When the sample starts just click on a feature to see the bug.
Thanks!
Steve</spatialquery>
001_Selection_Test.zip (26.4 KB)