Overview
The MapFile Generator is a tool to dynamically create, edit, and remove map files for MapDotNet Server. MapFiles store information about a map such as layers, symbology, and extents which is used by the MDNS web services for rendering maps and querying data.
Getting Started
The MapFile Generator is a web application that can be installed alongside the MapDotNet Server Web Service. It is accessible from the Start Menu:

The Main Menu - Creating, Editing, and Removing Maps
This page provides options for creating, editing, and deleting MapFiles on the MapDotNet Server machine:

To create a map, enter a unique name in the text field and press the 'Create' button. This will create a MapFile on the server and then load the Map Editor page. If there are any problems, such as the map name already exists, an error message will appear next to the 'Create' button.
To edit an existing map, select it from the drop-down list and press 'Edit'. This will load the Map Editor page.
To remove an existing map, select it from the drop-down list and press 'Remove'. A warning dialog will appear asking to confirm the decision. This is because once a map has been removed, it has been deleted from the server permanently. If there are any problems removing the map, an error message will appear next to the 'Remove' button.
The Map Editor
The Map Editor interface is the core of MapFile Generator and provides the ability to interactively edit a MapFile:

To return to the Main Menu, click the link in the top right corner of the page.
The top portion of interface is an interactive map. The toolbar provides tools for manipulating the extents:

The legend shows the currently visible layers:

The legend can be hidden by clicking the collapse arrow circled in red above. Clicking it again will reveal it. Note that the legend is not editable. Nor will changes to the extents affect the MapFile. All changes to the MapFile must occur in the source. However, below the actual map the current extents are provided which can be pasted into the code for convenience.
The bottom portion of the interface is the source code editor. It contain a text area with the current loaded map's MapFile source. The header of this content looks as so:

Again, the source code can be hidden by clicking the collapse arror circled in red above. Clicking it again will reveal it. Next to the title in brackets is the current position of the cursor in the source (if there is one). On the right side are three links:
- Publish - This saves the edited MapFile to the server. If there is an error a pop-up window will display as so:

This dialog provides information as to the problem and the location in the source. The cursor position in the header can be used to locate the issue. When an error does occur on publishing, the MapFile source is not overwritten on the server. Thus, a working version of the Map is retained.
- Revert - This reverts the current source code in the text area to the version on the server. This is useful for undoing an error added to the source. When the source has been reverted a notification will appear in the header as so:

- Reference - This will open a link to a reference page for the mapfile format.
The Text Editor
Finally, the text editor portion of the editor is where all of the work will be done. Layers can be added and removed, complex symbology can be created, scalebars can be embedded, and many other things as well. See the above mentioned MapFile Reference for details on the format and the Working With MapFiles page for help adding Layers.
Next Step: Create a Web Site >>