MapServer Object Model

Introduction ››
Parent Previous Next

MapServer Object Model

Overview

MapFiles configured in MapManager define


  • Relationships between objects
  • Location of datasets
  • How objects are to be drawn


There are some important concepts that should be taken into account before starting to create a complex map configuration.


The hierarchy of the main objects are shown by the Layer panel containing a tree view including


  • The Map                (Map Object)
  • Map Layers          (Layer Object)
  • Layer Classes        (Class Object)
  • Class Styles                    (Style Object)
  • Class Label                    (Label Object)


Map Object

The Map Object is the root of the map configuration and represents the map served by MapServer. The common properties of the map are attached to the Map Object can be modified in the Map Property Editor.  The Map Object can have arbitrary number of Layer Objects (as reflected by the Layer panel).

The Map Object has a QueryMap Object and a Scalebar Object to define the parameters related to the feature query and the embedded scalebar.

QueryMap Object

The Map Object has a single QueryMap Object to define how the results of the feature query will be represented in the map. The parameters (i.e.. highlight colour and style) can be set in the QueryMap Property Editor.

Scalebar Object

The Map Object has a single Scalebar Object to specify whether an embedded scalebar should be displayed on the map. The scalebar parameters (ie. colours position and style) can be set in the Scalebar Property Editor.

Projection Object

The Map Object and the Layer Object have a Projection Object to define the spatial reference of the map and the layer. When the spatial reference of the map and the layer are different all of the features are reprojected automatically when the layer is rendered. MapManager provides a

Projection Browser Dialogue in order to select the desired projection and represent the hierarchy of the supported projections

in tree view.

Layer Object

The Layer Object is the most fundamental part of the map configuration. It defines the data source, the style and the labelling information of the features. The parameters of the Layer Object can be modified in the Layer Property Editor. Each layer should have one or more Class Objects (reflected by the Layer panel

) which represents a set of features to be drawn the same way. If a Layer Object has only one Class Object then the class is not represented as a separate object in the Layer panel. In this case the class can be edited by pressing the Class button in the Layer Property Editor.

Class Object

The Class Object represents all or a subset of the features of the layer that will be drawn with the same style and labeling. The parameters of the Class Object can be modified in the Class Property Editor. By default all of the features will belong to the class. You must specify a valid expression to define only a subset of the features. You can define more than one class for a layer and specify scale dependent rendering to select which class should be rendered at a given scale.

The Class Object can have one or more Style Objects to define the sequence of the drawing operations. In most cases a Class Object has only one Style Object. In this case the style is not represented as a separate object in the Layer panel and the style can be edited by pressing the Style button in the Layer Property Editor or the Edit Style button in the Class Property Editor.

The Class Object can have one or more Label Objects to specify the annotation. Label Objects can be edited by pressing the Edit Label button in the Class Property Editor. If the layer has only one Class Object then the corresponding Label Object can also be edited by pressing the Label button in the Layer Property Editor.

Style Object

The Style Object represents a single unit of rendering for the features of the layer. The Class Objects can have multiple Style Objects to define the sequence of drawing the individual component styles. You can specify the parameters (like size, colours, position and opacity) of the Style Object in the corresponding

Style Property Editor. You can select one Symbol Object per style to modify the default drawing behaviour (like dotted lines or hash patterns). For more information about the Style Object see Setting up the Style and Symbology.

Symbol Object

You can select a Symbol Object in the symbol list of the Style Property Editor to define special drawing patterns. The available symbols are predefined in the symbolset file attached to the map. For more information about the symbolset file see Working With Map Files.

Label Object

Each Class Object has a single Label Object to define the parameters (ie. size, positions, colouring and shadowing) of the labels displayed along with the features. The parameters of the Label Object can be edited in the corresponding Label Property Editor. For more information about the labelling see Setting up the Annotation.