Current view/export projection issue

MaxMax Global Mapper UserPosts: 14
edited March 2011 in SDK
Hi Mike!

In my project, the view/export projection is set using GM_SetProjection function once after process start and never changed during the process lifetime. That works just fine unless the last of opened layers become closed: after that an attempt to call GM_GetProjection fails with "no projection selected" error. I was surprized with such behavior, because the view/export projection is set before any layer is opened, so I didn't expected GM_CloseLayer affect current projection in any way.

Is this a bug? If not, what is the reason of such behavior? Does any other SDK functions affect the current projection?


  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited March 2011
    This is by design so that if you unload everything and then load a new file the projection will by default be set to the projection of the first loaded file rather than staying some old projection that might not be appropriate. What you can do is just call GM_SetProjection to the desired projection at startup and after closing the last overlay (or just after closing any layer, won't hurt anything) so you can always keep a specific projection.


    Global Mapper Support
Sign In or Register to comment.