ThinkGeo.com    |     Documentation    |     Premium Support

ArgumentException when paning while adding shapes to ImMemory Layer

Hello,


I have a lot of shapes that are loaded  with a background worker (I load data from DB, and I create shapes) (about 8000 multipolygons)

I want those polygones to be displayed gradually on the map. So I send an event to the map each 400 polygons.

The map receive this event, and draw the polygons in the InMemoryLayer while the background worker prepares the next shapes.


When I don't do anything else in the same time, it seems to work good. But when I try to pan or to zoom In on the map while the drawing, than I get the following ArgumentException :


"Das Zielarray ist nicht lang genug. Überprüfen Sie destIndex, die Länge und die Untergrenze des Arrays."


in Shakespeare language, it have to be somthing like that :



"Destination array was not long enough. Check destIndex and length, and the array's lower bounds."


And the Stacktrace :


bei System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)    bei System.Collections.ArrayList.CopyTo(Array array, Int32 arrayIndex)    bei System.Collections.ArrayList.InsertRange(Int32 index, ICollection c)    bei System.Collections.ArrayList.AddRange(ICollection c)    bei System.Collections.ArrayList..ctor(ICollection c)    bei GisSharpBlog.NetTopologySuite.Index.Strtree.STRtree.CreateParentBoundables(IList childBoundables, Int32 newLevel)    bei GisSharpBlog.NetTopologySuite.Index.Strtree.AbstractSTRtree.CreateHigherLevels(IList boundablesOfALevel, Int32 level)    bei GisSharpBlog.NetTopologySuite.Index.Strtree.AbstractSTRtree.Build()    bei GisSharpBlog.NetTopologySuite.Index.Strtree.AbstractSTRtree.get_Count()    bei ThinkGeo.MapSuite.Core.InMemoryFeatureSource.GetFeaturesInsideBoundingBoxCore(RectangleShape boundingBox, IEnumerable`1 returningColumnNames)    bei ThinkGeo.MapSuite.Core.FeatureSource.GetFeaturesForDrawingCore(RectangleShape boundingBox, Double screenWidth, Double screenHeight, IEnumerable`1 returningColumnNames)    bei ThinkGeo.MapSuite.Core.FeatureSource.GetFeaturesForDrawing(RectangleShape boundingBox, Double screenWidth, Double screenHeight, IEnumerable`1 returningColumnNames)    bei ThinkGeo.MapSuite.Core.FeatureLayer.DrawCore(GeoCanvas canvas, Collection`1 labelsInAllLayers)    bei ThinkGeo.MapSuite.Core.Layer.Draw(GeoCanvas canvas, Collection`1 labelsInAllLayers)    bei ThinkGeo.MapSuite.DesktopEdition.LayerOverlay.DrawCore(GeoCanvas canvas)    bei ThinkGeo.MapSuite.DesktopEdition.Overlay.Draw(GeoCanvas canvas)    bei ThinkGeo.MapSuite.DesktopEdition.WpfMap.x5021a7a45adbb9ee(Object x3faa3e674cef60b0)    bei System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)    bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)    bei System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)    bei System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)


 


I have to say that multi-threading mode is activated.


Please would you have any suggestion ?

Many thanks,

Guillaume.



Guillaume, 
  
 I can not recreate your exception. 
  
 Please send us a sample to reprocedure the exception will be more helpful. 
  
 Thanks. 
  
 James

Hello, 
  
 I’ll prepare you a sample as soon as possible, but I must first deal with others problems first, sorry… 
 Thank you anyway, 
 Guillaume.

Guillaume, 
  
 Thanks for you’re mentioned! 
  
 Please let me know when you will have time to supply a sample. 
  
 Thanks. 
  
 James