[GIS] Creating Map Document for DotSpatial

dotspatial

How can I create a Map Document (including layers, symbology info etc.) for DotSpatial just like we have MXD File in ArcGIS?

Best Answer

Adding the MenuBar plugin to your app will provide your user with an option on the File menu to Save Project. The project file is an xml based file that includes the layers, symbology and so on.

If you are creating your own DotSpatial app and wish to provide some other mechanism to save the project, please refer to the MenuBar plugin code for an example:

        try
        {
            //use the AppManager.SerializationManager to save the project
            App.SerializationManager.SaveProject(fileName);
        }
        catch (XmlException)
        {
            ShowSaveAsError(fileName);
        }
        catch (IOException)
        {
            ShowSaveAsError(fileName);
        }
Related Question