I'm looking for a way to draw a decorated line in the map, specifically a line with squares or triangles along it, with the shapes being equally spaced along the line and drawn perpendicular to it. Here are some image examples of the result I need:


I've tried using a CompositeSymbol, consisting of a SimpleLineSymbol and a SimpleMarkerSymbol, but the markers show on every vertex of the line, instead of equally spaced along it, and always with the same orientation.

Is there a way to create a line symbol that achieves the effect I'm looking for?