Yale,
I used your code and also included a debug output for stacktrace. I copied some of the debug output lines below: (all the rest are similar):
-180.000920081838,90.0001911803346,180.000019306236,-90.0000214543017
A first chance exception of type ‘System.NullReferenceException’ occurred in MapSuiteCore.dll
Object reference not set to an instance of an object. at ThinkGeo.MapSuite.Core.xa65d8a7495fb9e05.WriteId(String id)
at ThinkGeo.MapSuite.Core.RtreeSpatialIndex.InsertRectangle(Double upperLeftX, Double upperLeftY, Double lowerRightX, Double lowerRightY, String rectangleId)
at ThinkGeo.MapSuite.Core.RtreeSpatialIndex.InsertRectangle(RectangleShape rectangle, String rectangleId)
at ThinkGeo.MapSuite.Core.RtreeSpatialIndex.AddCore(Feature feature)
at ThinkGeo.MapSuite.Core.SpatialIndex.Add(BaseShape baseShape)
at CSWpfDesktopEditionSample.WorldMapKitRenderLayer.RebuildBondingBox() in C:\PROJECTS\WorldMapKitDemo\CSWpfDesktopEditionSample\WorldMapKitRenderLayer.cs:line 3377
-180,90,180,-85.582763671875
A first chance exception of type ‘System.NullReferenceException’ occurred in MapSuiteCore.dll
Object reference not set to an instance of an object. at ThinkGeo.MapSuite.Core.xa65d8a7495fb9e05.WriteId(String id)
at ThinkGeo.MapSuite.Core.RtreeSpatialIndex.InsertRectangle(Double upperLeftX, Double upperLeftY, Double lowerRightX, Double lowerRightY, String rectangleId)
at ThinkGeo.MapSuite.Core.RtreeSpatialIndex.InsertRectangle(RectangleShape rectangle, String rectangleId)
at ThinkGeo.MapSuite.Core.RtreeSpatialIndex.AddCore(Feature feature)
at ThinkGeo.MapSuite.Core.SpatialIndex.Add(BaseShape baseShape)
at CSWpfDesktopEditionSample.WorldMapKitRenderLayer.RebuildBondingBox() in C:\PROJECTS\WorldMapKitDemo\CSWpfDesktopEditionSample\WorldMapKitRenderLayer.cs:line 3377
Regarding the code to create the Rtree files, this is actually my original question. When I tried the code suggested by James, I found the exceptions. Hope you could help on this. Thanks.