I need to show on the map the direction of the road traffic with arrows. For this purpose I use markers for Carto CSS in TileMill.

If the road has in OSM tag oneway="yes" or oneway="1", all is ok, but sometimes the tag is oneway="-1" that means my direction arrows should be rotated to 180 degrees. It would not be a big problem (marker-transform: "rotate(180,0,0)";) but at the same time I also need to scale my markers in different zooms (for ex., marker-transform: "scale(0.5)";).

I have no idea how to apply both transformations at the same time - I change their positions in the code but it shows me rather only first or second transformation.

1 Answer 1


Two separate marker-transform properties can't be applied for the same object, but if you can apply a single property with multiple functions in it:

marker-transform: 'scale(0.5) rotate(180)';

However this would likely require you rearrange your code to apply the correct rotations at the same time and make things more complicated.

A simpler approach would be to use the marker-width property to scale your arrows (specifying an explicit pixel value rather than a relative scaling value), and use marker-transform just for the rotation.

  • Thanx! It helped me a lot!
    – Angpy
    Commented Oct 27, 2014 at 7:40

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.