ThinkGeo.com    |     Documentation    |     Premium Support

Error using rotation projection

Following the rotation projection example, I have a project with an overlay that loads a bunch of shape files and and overlay that contains a layer for vehicle tracking.


I create a rotation projection and assign to the layers feature source projection.


After I call:


                winformsMap1.CurrentExtent = _rotationProjection.GetUpdatedExtent(rect);

                winformsMap1.Refresh();


 


It gets through the load routine just fine, but then out of nowhere I get the following exception that crashes the app:


System.InvalidOperationException: The projection is not open.  Please open it before calling this method.

   at ThinkGeo.MapSuite.DesktopEdition.Overlay.Draw(GeoCanvas canvas)

   at ThinkGeo.MapSuite.DesktopEdition.WinformsMap.x5021a7a45adbb9ee(Object x3faa3e674cef60b0)

   at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)

   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)

   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)


 


Any ideas what is causing this exception to occur?  I have tripple checked and followed the example code to add a rotation projection, but have been unable to get it to actually work.



Michael,


Thanks for your post and question.
 
Which version are you trying to use? We have fixed a problem related with Projection open stuff in latest public release(3.1.299).
 
I think the problem is that you did not open the projection before map.Refresh is called after you close it. Can you show us all the code you are using the projection especially releated with Open & Close for it?
 
Any more quesitons just feel free to let me know.
 
Thanks.
 
Yale