Property Editor - Layer Object
The Layer Property Editor provides controls to set the properties of the layer object. The properties are divided into groups with each group represented by a separate tab sheet. Each explained below:
General
The General tab allows to set the general properties of the layer object.
- Layer Name - Formatted name for this layer. Limit is 20 characters. The name should be unique, otherwise MapManager will display a warning message and rename the layer automatically
- Projection - The current projection of the layer. By pressing the button to the right, the projection can be selected in a Projection Browser Dialogue
- Link - Hyperlink associated to the layer for use in IntraMaps. The link should be structured like link|caption|tooltip|parameters
For example: http://www.somelink.com|The Caption|This is a tooltip|pseudo=true;modal=true;width=250;height=100
- Display Range - This checkbox allows to specify the scale range or zoom range the layer is displayed within. In Scale Range mode the closest and the farthest scale can be specified. In Zoom Range mode the minimum and the maximum value of the zoom width (in map units) can be specified. Clicking on the button we can set the current zoom or scale of the map
- Visible - Enable or disable the visibility flag of the layer
- Queryable - Enable of disable the query flag of the layer. Only the features of a queryable layer can be selected by using the MapManager feature selection operations and IntraMaps Info tool
- Opacity - The current opacity setting of the layer. The opacity can be set by using the slider from 0% to 100%
Data
The Data tab provides properties related to the data source of the layer. Data parameters are generally set when the Layer is added but the user has access to configure their own layer and modify existing parameters.
- Connection Type - The connection type of the layer to be used by MapServer. The supported connection types are: MS_INLINE, MS_MYGIS, MS_OGR, MS_PLUGIN, MS_POSTGIS, MS_RASTER, MS_TILED_SHAPEFILE, MS_SHAPEFILE, MS_WFS, MS_WMS. For more information about the connection types please refer to the possible Vector Formats and Raster Formats
- Type - Specifies how the data should be drawn. This setting does not need not be the same as the layer's geometry type. Geometry conversions can be imposed by MapServer for most geometry types. For example, a polygon layer may be drawn as a point layer, however a point layer may not be drawn as a polygon layer. A common use of this feature is to define a layer to show annotations instead of geometry features. In the aannotation mode a label feature will be dynamically generated. Points are labelled at that point. Lines are labelled at the middle of the longest arc in the visible portion of the line. Polygons are labelled first using a centroid, and if that doesn't fall in the polygon a scanline approach is used to guarantee the label falls within the feature. Query only means the layer can be queried but not drawn. Possible values are: MS_LAYER_POINT, MS_LAYER_LINE, MS_LAYER_POLYGON, MS_LAYER_RASTER, MS_LAYER_ANNOTATION, MS_LAYER_QUERY, MS_LAYER_CHART
- Connection - File name or database connection string to retrieve a dataset. For more information about the possible connection strings please refer to the possible Vector Fomats and Raster Formats
An MSSQL connection string consists of a hostname, instance name, database name, username and password separated by commas:
Server=localhost\sqlexpress;Database=GIS;Trusted_Connection=True
A PostGIS connection string is a regular PostgreSQL connection string, it takes the form of:
user=nobody password=****** dbname=dbname host=localhost port=5432
An Oracle connection string:
user/pass[@db]
- Data - Full filename or filtering options of the spatial data to process. No file extension is necessary for shapefiles. Can be specified relative to the SHAPEPATH option from the Map Object. For more information please refer to the possible Vector Fomats and Raster Formats.
Example showing SQL Server dataset data parameter
ogr_geometry from tablename USING UNIQUE ogr_fid USING SRID=28355
- Filter - This parameter allows for data specific attribute filtering that is done at the same time spatial filtering is done, but before any CLASS expressions are evaluated. For OGR and shapefiles the string is simply a mapserver regular expression. For spatial databases the string is a SQL WHERE clause that is valid with respect to the underlying database. For example:
Filtering based on dataset attributes
([type]=’road’ and [size]<2)
Filtering on Geometry Type (SQL Server)
"ogr_geometry.STGeometryType() = 'Point'"
- Plugin Library - When the connection type is set to MS_PLUGIN the dll name of the plugin library can be selected in this combo box. Currently the following options are supported by MapManager: msplugin_sql2008.dll, msplugin_sde91.dll, msplugin_oracle.dll.
Label & Style
The Label & Style tab contains the properties related to the label rendering and style (symbology and colouring) of the layer.
- Auto Style - Setting the Auto Style option of the layer. When using the auto style mode the style is automatically retrieved from the data source instead of using the layer settings. Currently only the OGR data sources support native auto styling. Auto Style can affect rendering performance of a MapFile. For more information see: Setting Up the Style and Symbology
- Label Cache - Specifies whether labels should be drawn at the time the features for this layer are drawn, or whether they should be cached and drawn after all layers have been drawn. Default is on. Label overlap removal, auto placement etc... are only available when the label cache is active
- Label Item - Attribute column from table to use for all classes annotation text (i.e. labelling). The combo box contains the possible feature attributes including the OGR Style meta-attributes for the OGR layers.
- Closest Scale - The closest scale at which the label should be displayed. Clicking on the button we can set the current scale of the map.
- Farthest Scale - The farthest scale at which the label should be displayed. Clicking on the button we can set the current scale of the map.
- Symbol Scale - Specifies the scale at which the symbol should be drawn at the given size when used in conjunctim with Min / Max rendering scale options in Symbol Style Property Editor and Label Property Editor. By setting this value the size of the symbols and labels will change proportionally according to the actual scale.
By pressing the Class button the parameters of the default class (ie. the first class object) or selected class object can be edited in the Class Property Editor. Any pending changes in the layer will automatically applied before the Class Property Editor is displayed.
By pressing the Style button the parameters of the default style or selected style object can be edited in the Style Property Editor. Any pending changes in the layer will automatically applied before the Style Property Editor is displayed.
By clicking on the Label button the parameters of the default label or selected label object can be edited in the Label Property Editor. Any pending changes in the layer will automatically applied before the Label Property Editor is displayed.
Note: For more information about the classes, styles and labels please refer to the MapServer Object Model.
Processing
The Processing tab contains layer specific processing directives. The supported processing directives vary by layer type, and the underlying driver that processes them.
- Attributes Directive - The ITEMS processing option allows to specify the name of attributes for inline layers or specify the subset of the attributes to be used by the layer, such as:
ITEMS=itemname1,itemname2,itemname3
- Connection Pooling Directive - This is where you can enable connection pooling for certain layer layer types. Connection pooling will allow MapServer to share the handle to an open database or layer connection throughout a single map draw process.
CLOSE_CONNECTION=DEFER
- OGR Styles Directive - This directive can be used for obtaining label styles through MapScript. For more information see the MapServer’s OGR document.
GETSHAPE_STYLE_ITEMS=all
- Raster Directives - Raster specific processing options. For more information see: Raster Data. Here we see the SCALE and BANDs directives used to auto-scale raster data and alter the band mapping.
SCALE=AUTO
BANDS=3,2,1
- Dynamic Charting - Starting with version 5.0, MapServer included the ability to automatically draw pie or bar graphs whose values are taken and adjusted from attributes of a data source. For more information see: Dynamic Charting.
CHART_TYPE=BAR
CHART_SIZE=65
CHART_BAR_MIN_VAL=10000
CHART_BAR_MAX_VAL=160000000