The look and feel of MapWindow is stored in a configuration file (*.mwcfg) and project specific information is stored in a project file (*.mwprj). Both of these files are XML format, which means that you can open and edit them directly in a text editor like Notepad. Every project file uses a specific config file. The reason for this is so that you can set up an “application” by customizing the config file, and then any project file created by that application knows to use the appropriate config file. It also allows you to distribute data to third parties using a more customized looking MapWindow. If you just open a project file (*.mwprj) in notepad, you will see a line that looks something like this:
<mapwin name= "MapWindow" type="projectfile" version="1.1" configurationpath="..\..\..\Program Files\MapWindow\default.mwcfg">''
The first few elements give information about the file type and the version of MapWindow that created it. Notice the “ConfigurationPath”. This is a relative path to a configuration file that opens with this project file. Usually it points to the location of your default MapWindow configuration file in the MapWindow installation directory. However, if you were to create your own configuration file and give it a different name, you could point your project file at it and then when you open this project it would use the new configuration file. For example, make a copy of the “default.mwcfg” file, rename it “test.mwcfg” and place it in the same directory as your project file. Then, in your project file, change the above line to look like this:
<mapwin name= "MapWindow" type="projectfile" version="1.1" configurationpath="test.mwcfg">
Now when you open that project file by double-clicking it, it will open with the configuration file, “test.mwcfg”. To make sure it worked, open the project file in MapWindow, save it again, close MapWindow, then open the project file in Notepad again and look at the ConfigurationPath. It should still be pointed at “test.mwcfg”. If it changed back to “default.mwcfg” then it either couldn't find the test.mwcfg file, or it was an invalid file. There are several sections of the configuration file that can be edited. However, the main section to edit is the <AppInfo> section. In the file “default.mwcfg” the AppInfo section looks like this:
<AppInfo name= "MapWindow" version="1.1" builddate="" developer="EMRC" Comments="" HelpFilePath="help\MapWindow30.chm" UseSplashScreen="True" SplashTime="2" DefaultDir="Sample Data\UnitedStates\Shapefiles"> <windowicon> <image type="Icon">AAABAAEAICAAA . . . </image> </windowicon> <splashpicture> <image type=""> </image> </splashpicture> </appinfo>
You can directly edit all of the tags in the AppInfo section except for the WindowIcon and the SplashPicture. Changes to the AppInfo section tags show up in the “About” form and also in the application title bar. The icon and the picture tags are encoded images that must be created in code. There is information on this in the discussion forum.
The purpose of the configuration file is to allow a user to build and deploy a custom GIS data visualization tool without doing any programming. The configuration file contains all of the basic information that defines the look and feel of the MapWindow including:
See Also:
The purpose of the project file is to allow a user to specify which data layers to load for a particular project. Take for example the Source Water Protection tool. When a user launches SWP, it sets up MapWindow with the right title bar, icon and splash screen and help file. Then it allows a user to create a new SWP “Project”. The user adds the needed data for a particular drainage, does some analyses and then can save it for later use. In this way, a developer using MapWindow can use the project file for all of the project-specific settings.
Information saved in the project file includes:
See Also: