{"action":"closed","issue":{"url":"https://api.github.com/repos/mogikanin/temp/issues/110","repository_url":"https://api.github.com/repos/mogikanin/temp","labels_url":"https://api.github.com/repos/mogikanin/temp/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/mogikanin/temp/issues/110/comments","events_url":"https://api.github.com/repos/mogikanin/temp/issues/110/events","html_url":"https://github.com/mogikanin/temp/issues/110","id":153403292,"number":110,"title":"Serialization and Project File saving - Move from Map level to AppManager level","user":{"login":"mogikanin","id":840681,"avatar_url":"https://avatars.githubusercontent.com/u/840681?v=3","gravatar_id":"","url":"https://api.github.com/users/mogikanin","html_url":"https://github.com/mogikanin","followers_url":"https://api.github.com/users/mogikanin/followers","following_url":"https://api.github.com/users/mogikanin/following{/other_user}","gists_url":"https://api.github.com/users/mogikanin/gists{/gist_id}","starred_url":"https://api.github.com/users/mogikanin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mogikanin/subscriptions","organizations_url":"https://api.github.com/users/mogikanin/orgs","repos_url":"https://api.github.com/users/mogikanin/repos","events_url":"https://api.github.com/users/mogikanin/events{/privacy}","received_events_url":"https://api.github.com/users/mogikanin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mogikanin/temp/labels/bug","name":"bug","color":"ee0701"},{"url":"https://api.github.com/repos/mogikanin/temp/labels/CodePlex","name":"CodePlex","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-06T08:29:19Z","updated_at":"2016-05-06T08:29:20Z","closed_at":"2016-05-06T08:29:20Z","body":"**This issue was imported from [CodePlex](http://dotspatial.codeplex.com/workitem/79)**\r\n\r\n**[jirikadlec2](http://www.codeplex.com/site/users/view/jirikadlec2)** wrote 2010-10-08 at 00:59\r\nCurrently in DotSpatial only the Map control and its nested components can be serialized to the Map.xml file.\r\n\r\n\r\nI suggest moving the serialization to the ApplicationManager level. If the serialization is is enabled at the AppManager level, then important information such as:\r\n\r\n<ul>\r\n<li>Which plugins are switched on </li><li>Plugin-specific settings \r\n\r\ncan be saved to the DotSpatial map.xml serialized project file. </li></ul>\r\n\r\n**[jirikadlec2](http://www.codeplex.com/site/users/view/jirikadlec2)** wrote 2010-10-08 at 01:00\r\n<a href=\"http://hydrodesktop.codeplex.com/workitem/7139\" rel=\"nofollow\">http://hydrodesktop.codeplex.com/workitem/7139</a>\r\n\r\n**[mudnug](http://www.codeplex.com/site/users/view/mudnug)** wrote 2011-01-06 at 00:41\r\nRelated to <a href=\"http://dotspatial.codeplex.com/workitem/78\" rel=\"nofollow\">\r\nhttp://dotspatial.codeplex.com/workitem/78</a>\r\n\r\n**[mudnug](http://www.codeplex.com/site/users/view/mudnug)** wrote 2011-01-06 at 00:43\r\nWhat are the consequences of doing this for existing clients? On what level to we need to support backwards compatibility inside of the *.map.xml files?\r\n\r\n**[jirikadlec2](http://www.codeplex.com/site/users/view/jirikadlec2)** wrote 2011-01-13 at 04:13\r\nRegarding existing clients we should to consider the following cases: \r\n\r\n1) An existing client with map control and AppManager component \r\n\r\n2) An existing client with map control and without the AppManager component \r\n\r\n\r\n\r\nI would propose the following approach to make the map.xml file back-compatible: \r\n\r\n1) Add a \"CustomSetting\" property to the map control. This would be a string placeholder where applications can save custom map-level (project-level) settings to the Map.Xml file\r\n\r\n\r\n2) Add a SaveProject() and LoadProject() methods to the AppManager. When the application calls SaveProject(), the plugin-specific information is saved to the CustomSettings string in the Map.Xml file. When the application calls LoadProject(), the map is reloaded\r\n and also the plugins-specific information is loaded from the CustomSettings string and plugins are activated or de-activated accordingly.\r\n\r\n\r\n\r\n\r\nThis way, a DotSpatial application without the AppManager component will still be able to read the Map.Xml file.\r\n\r\n**[jirikadlec2](http://www.codeplex.com/site/users/view/jirikadlec2)** wrote 2011-02-07 at 20:00\r\nThe list of active plug-ins is still not correctly saved in the .dspx project file due to the issue #243 (IsEnabled property of plug-in is displayed as \"false\" when the plug-in is active, and so the list of active plugins is not serialized. Reopening\r\n this issue.\r\n\r\n**[jirikadlec2](http://www.codeplex.com/site/users/view/jirikadlec2)** wrote 2011-02-25 at 23:57\r\nFixed by testing appManager.IsActive(token) instead of token.Enabled"}}