With MapServer MapManager, the styles are managed and categorised (i.e. Points, Lines and Polygons) in the Style Library so that when you want to change the style of a layer only the relevant style categories are loaded. The Style Library dialogue is available from the Main Menu under the Tools -> Style Library. In the Style Library dialogue you can view, edit and add new styles and categories.
The Style Library is designed around a map file with layers and classes (mmstyles.map located in the templates directory of MapManager). Each layer represents a style category and the styles within each category/layer are exposed as classes.
User can add style categories (i.e. layers), add styles (i.e. classes) within a category and modify existing styles.
The styles configured in the Style Library can be selected for the styles of the map in the Style Properties dialogue by choosing the style category in the combo-box and selecting the style in the list right below the category combo.
When selecting a specific style, all the default properties configured within the style library are automatically applied, then you can override any of these properties using the Style Properties dialogue.
Configuring the Style Library can be done with following activities by default:
We can add new categories and styles by using the button on the local toolbar or the context menu of the tree view (See images below).
To rename a style category or style, right click on the node and select the 'Rename' item in the context menu. You can also modify the name of the StyleLibrary by renaming the upper level node, see below:
The properties of the selected style can be edited in the Style Properties dialogue by double clicking on the style node or selecting the Properties menu item in the context menu.
Then the style properties can be edited in the dialogue below:
The dialogue contains the following parameters:
Once the Style Library configuration is modified we can save the current version of mmstyles.map by clicking on the 'Save' button at the bottom right of the Style Library dialogue.
The text tab of the Style Library dialogue provides the option to edit the configuration (mmstyles.map) in the text editor.
We can locate any item in the text editor by right clicking on the item in the tree view first and select the 'Go To Layer (Text)' and 'Go To Class (Text)' menu items depending on whether a style category or a style node is selected.
Open the Style Library and go to to the Symbolset tab. Use the text editor to add a symbol. It is recommended that symbols that will be used across many map files are added to the Symbolset. Symbols used only in one or two map files can be added as inline symbols to the map file. It is recommended that you do not add inline symbols to the Style Library file (mmstyles.map)
The Style Library allows you to automatically add all the symbols/characters from a TrueType Font, without the need to reference every single character/symbol in the Symbolset file. Instead these characters are automatically copied to the Style Library map file as inline symbols. When used in your map, MapManager also copies the required symbol as an inline symbol in your map file.
To configure this functionality, open the Style Library in MapManager, go to the Text tab and add the first symbol from the True Type font:
Create a layer and add the following metadata and class, with the character-count metadata tag indicating how many symbols you want to add, start from the one you have just added above and ensure that the class name is the font name configure in the font file:
END # METADATA
NAME "MapServer Animals"
COLOR 0 0 0
END # STYLE
END # CLASS
END # FEATURE
END # LAYER