|
Here we have tried to provide real life examples of symbology in iShare using MapServer along with a Symbols Gallery. See Symbols & Styling for other examples.
You should create your own symbols file in the /mapserver/shared/symbols folder and copy any symbols that you wish from the supplied symbolsms6.1.sym file which you will find in the same folder. Then you will be able to edit this file without a subsequent upgrade to iShare overwriting your changes and as it will only contain the symbols you wish to use will make it easier to manage. Your new symbols file must start with a SYMBOLSET entry and have a matching END and then each individual SYMBOL entry with matching END e.g.
You will also need to edit the .MAP file and change the SYMBOLSET entry near the top to point to your new file e.g.
|
The HATCH style allows for a line to be be used at any angle with any width, all defined in the .map file.
Description | CLASS snippet (from .map file) | Thumbnail | |
---|---|---|---|
Standard horizontal (no ANGLE)
|
| ||
ANGLE 135 |
| ||
ANGLE 45 |
| ||
ANGLE 90 |
| ||
SIZE 10
WIDTH 4
|
|
Description | Label Snippet | Thumbnail | |
---|---|---|---|
POINT fill with CIRCLE The use of GAP and SIZE to change the spread and the size of the circles
NOTE a separate STYLE is needed for the OUTLINE |
|
Description | Label Snippet | Thumbnail | |
---|---|---|---|
Single Line |
| ||
Double Line |
|
Description | Label Snippet | Thumbnail | |
---|---|---|---|
Simple PIXMAP (external graphic) symbolHere the SYMBOL is definined in the relevant symbols .sym file or in the MAP header - See Symbols & Styling for other examples. |
| ||
Scaled SymbologySeparate classes for scaled symbology and ensure that Legend Graphic isn't confusing. In this example there are three classes for emphasis. In this example the size of the circle depends upon the zoom level. |
|
| |
Graduated Point ThematicGraduated symbol size is handled by using a numerical attribute for the symbol size. In this example there are two classes for emphasis. The CLASSITEM entry defines the field that is to be used in the EXPRESSION etc. size_percent in this example.
|
|
Description | Label Snippet | Thumbnail | |
---|---|---|---|
Coloured Boundary – Transparent Fill |
| ||
Coloured Boundary – Coloured Fill |
|
Description | Label Snippet | Thumbnail | |
---|---|---|---|
Label - with POSITION UCPlace the Label as Upper Centre |
| ||
Concatenate fields (TEXT) and then WRAP on their comma |
| ||
Concatenate fields inside an SQL if using PostgreSQL(as opposed to the TEXT "[field1] field2 etc"
This gives utmost flexibility to how the text can be treated |
| ||
ANGLE FOLLOW and MINFEATURESIZE AUTOWith the second screen shot you can see how the labelling can now fit within the FEATURE and therefore MINFEATURESIZE AUTO allows for this
MINFEATURESIZE also allows for the restriction according to the Minimum Bounding Rectangle of a feature (in pixels) |
| ||
How can I label certain features and not others?
|
| ||
As above with extra Label with different colour.
|
|
Description | Layer snippet | Thumbs | |
---|---|---|---|
How do I filter a layer to only certain features?
Change the counties layer to include - see the Layer snippet -->
Please note this is different to only drawing certain features as it is like having a subquery. |
|
| |
How do I filter a layer to only draw certain features based on a field value?Change the mainplaces Layer - see the Layer snippet -->
Have &Layer=mainplaces in the URL. |
| ||
How do I filter a layer to draw certain features in different styles based on a field value?Change the mainplaces Layer - see the Layer snippet -->
Have &Layer=mainplaces in the URL. |
|
Description | Layer snippet | Thumbs | ||
---|---|---|---|---|
Variable points styles depending on the scale of the map |
|
| ||
A little more complexity, if boundaries are too complex then transform the geometries (GEOMTRANSFORM) to their centroids at a certain scale Other options include (from MapServer site) GEOMTRANSFORM [bbox|end|labelpnt|labelpoly|start|vertices|<expression>] Used to indicate that the current feature will be transformed before the actual style is applied. Introduced in version 5.4.
|
|
|
Description | Snippet | Thumb | ||
---|---|---|---|---|
CLUSTERS This layer is combined with the hw_road_accidents layer it is purely for display purposes highlighting some of the advanced functionality of MapServer
Note the class Accident Clusters in the layer hw_road_accidents - the second class isn't used for map display (due to MAXSCALEDENOM) but is here for the GetLegendGraphic request |
|
|
Description | Label Snippet | Thumbnail | |
---|---|---|---|
GoLoaderShowing an area of Coniferous trees |
| ||
TranspOSe/SuperpOSeShowing an area of Non Coniferous trees |
|