| 1 | = Suggestions / Enhancements = |
| 2 | |
| 3 | --------- |
| 4 | |
| 5 | == Improved support for dashed lines == |
| 6 | |
| 7 | To improve the support of dashed lines in Mapserver, INITIALGAP needs to be added as a STYLE |
| 8 | parameter and GAP needs to specify the centre to centre distance between points. |
| 9 | |
| 10 | === Current support for dashed lines in Mapserver === |
| 11 | |
| 12 | Dashed lines have "always" been supported by Mapserver. Currently (Mapserver 6.0) with the |
| 13 | LAYER-> CLASS-> STYLE-> PATTERN parameter. |
| 14 | |
| 15 | {{{PATTERN <length1> <gap1> <length2> <gap2> ... END}}} |
| 16 | |
| 17 | The pattern is repeated until the end of the line is reached. |
| 18 | |
| 19 | === Support for styling of dashed lines with point symbols === |
| 20 | |
| 21 | Lines can be styled with point symbols using the LAYER-> CLASS-> STYLE-> GAP parameter, |
| 22 | which places point symbols along a line with a spacing given by GAP. Currently, dashed lines can not |
| 23 | be styled in this way. It is not possible to make the signature in the figure with Mapserver: |
| 24 | In order to support this kind of signature (which is used on orienteering maps), it must be possible to |
| 25 | specify the gap to the first symbol on the line separately. For instance using INITIALGAP (as used in |
| 26 | SLD), as suggested in Mapserver ticket #3879. Using INITIALGAP, the signature can be specified |
| 27 | as follows: |
| 28 | |
| 29 | {{{ |
| 30 | STYLE # DASHED LINE |
| 31 | COLOR 0 0 0 |
| 32 | WIDTH 0.1 |
| 33 | PATTERN 2.25 0.25 END |
| 34 | END |
| 35 | STYLE # POINTS |
| 36 | SYMBOL "circlef" |
| 37 | COLOR 0 0 0 |
| 38 | SIZE 0.4 |
| 39 | INITIALGAP 1.125 |
| 40 | GAP 2.5 |
| 41 | END |
| 42 | }}} |
| 43 | |
| 44 | To simplify this kind of styling, it is also important that the GAP value specifies the centre to centre |
| 45 | distance between the points (as suggested in Mapserver ticket #3867). |
| 46 | |
| 47 | === Support for styling of dashed lines with dashed lines === |
| 48 | |
| 49 | Lines can be styled with dashed lines by overlay (STYLE on STYLE). But styling of dashed lines |
| 50 | with dashed lines is currently not possible. In order to make this possible it is necessary to specify a |
| 51 | gap to the start of the pattern, for instance using INITIALGAP, as used for point symbols. |
| 52 | |
| 53 | [[Image()]] |
| 54 | |
| 55 | {{{ |
| 56 | STYLE |
| 57 | COLOR 0 0 0 |
| 58 | WIDTH 0.2 |
| 59 | PATTERN 2.25 0.25 END |
| 60 | END |
| 61 | STYLE |
| 62 | COLOR 255 255 255 |
| 63 | WIDTH 0.1 |
| 64 | INITIALGAP 0.5 |
| 65 | PATTERN 1.25 1.25 END |
| 66 | END |
| 67 | }}} |
| 68 | |
| 69 | --------- |