I have a map with three lines. Each has a marker on it.

enter image description here

I would like to reverse the direction of the topmost marker. So I open Style dialog and enter the expression "direction" * 180. The value of direction of the topmost line is 1. Others are 0.

enter image description here

The result is shown below.

enter image description here

Two issues here:

  • The angles of all markers are the same.
  • The direction of the topmost marker is not reversed. (Is there a way to access a default value of 'Angle' property?)
  • You can turn the symbol by setting the angel into 180 in the Line - Marker line - Marker - Simple marker. The place is visible in your first screen capture. For using data defined properties there should be a field for that in the vector data for telling the angle.
    – user30184
    Jun 16, 2014 at 10:22
  • @user30184 I'd like to reverse some markers (not all).
    – wannik
    Jun 16, 2014 at 11:32
  • Sorry. I made a test shapefile with angle field as "double", I filled in values 0 and 1 and later also 0 and 180 and tried to make the data driven rotation to work. All my symbols seem to stay always at 0°, also SVG symbols. I can only confirm your issue.
    – user30184
    Jun 16, 2014 at 12:07
  • I have managed to get it to work using one of the properties (i.e. $length), but of course with the limitation I couldn't get the base angle to add to a calculated bonus. I described a workaround as answer - requires a bit of python use though. Jun 16, 2014 at 12:10
  • 2
    If you do not want to edit the data you can make two rule based styles for the lines: one for value "0" and another for "1". Then add marker lines to both styles. For the second one use marker editor and create a 180° rotated copy from the triangle2 marker.
    – user30184
    Jun 16, 2014 at 12:24

1 Answer 1


It appears the easiest way (given I can't see a method to acces the property that holds the 'standard' marker rotation) is to reverse the actual line direction.

I'd suggest you use a Query to select all items where "direction" = 1 and then apply the method described Here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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