2

I created this image:

enter image description here

with:

MAP
  SIZE 1000 1000
  IMAGETYPE png24
  EXTENT -30 -10 60 30
  UNITS DD

SYMBOL
  NAME "v-line-shift"
  TYPE vector
  POINTS
    0   0
    5  10
    10  0
  END # POINTS
  ANCHORPOINT 0.5 0
END # SYMBOL

LAYER  # Simple line
  STATUS DEFAULT
  TYPE LINE
  FEATURE
    POINTS
      5 25
      25 20
      45 20
      35 15
    END # Points
  END # Feature
  CLASS
    STYLE
      COLOR 0 0 0
      WIDTH 2.5
    END # STYLE
    STYLE
      SYMBOL "v-line-shift"
      COLOR 0 0 0
      SIZE 8
      INITIALGAP 1
      GAP 10
    END
  END # CLASS
END # LAYER
END # MAP

and I would like to know if these arrows can automatically follow the direction of this changing line (ie. arrow would be aligned with the line, something like e.g., ---->---->---)

I'm using MapServer 6.4.1.


I enclose here an example of the end result.

enter image description here

3

I have used an arrow symbol as:

SYMBOL
        NAME "arrow"
        TYPE vector
        FILLED true
        POINTS
          0 0.4
          3 0.4
          3 0
          5 0.8
          3 1.6
          3 1.2
          0 1.2
          0 0.4
        END # POINTS
        ANCHORPOINT 1 0.5
END # SYMBOL

This style adds an arrowhead to endpoints of lines

STYLE
GEOMTRANSFORM "end"
COLOR 100 200 100
SYMBOL "arrow"
SIZE 7.0
ANGLE AUTO
END # STYLE

In your case it might be enough just to add ANGLE AUTOinto your style. If not, a truetype character symbol may work better:

SYMBOL
  NAME "V"
  TYPE truetype
  FONT "arial"
  CHARACTER "V"
END # SYMBOL

Probably character ">" is the one for you but I took "V" because it should at least work if "P" works as in document http://www.mapserver.org/mapfile/symbology/construction.html.

And one more thing to try: GEOMTRANSFORM "vertices", read http://mapserver.org/fr/mapfile/geomtransform.html.

  • thanks for quick reply, but ANGLE AUTO didn't do the trick, even though it works with GEOMTRANSFORM, any other idea? – Gery Aug 7 '15 at 16:20
  • Added two ideas: using suitable truetype character or geomtransform "vertices". – user30184 Aug 7 '15 at 20:27
  • thanks a lot! the ">" idea based on "P" is the most suitable solution to fulfill my needs, thanks again! – Gery Aug 10 '15 at 16:05
  • It would be nice to see also an image that shows the end result. – user30184 Aug 11 '15 at 7:17
  • sorry for my late reply, please check the end result in my edit above, thanks for all your support!. – Gery Oct 21 '15 at 14:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.