1

I'm working on a TileMill project essentially displaying freight routes. The original shapefile contains a origin city and a destination city (and a path between both cities). When I apply a marker-type:arrow; /marker-placement:line; code in CartoCSS, I just don't quite understand the logic of how arrow direction actually gets assigned in this case. Ideally obviously I would like the arrows to point in the origin city to destination city direction.

4
  • Each line has a 'direction', defined implicitly by the order of coordinates of the geometry. If the result is backwards, I suspect your geometry has been defined 'backwards'; that is, it was drawn destination→origin, rather than origin→destination. Commented Jan 17, 2015 at 23:08
  • I want to add arrows to my basemap, the arrows are hidden under roads, they are not appear on the roads and I don't know if they are in the right direction and for both of direction in the same road, how to make it? I use : ::decoration [zoom >= 16]{ marker-type:arrow; marker-placement:line; } Commented Sep 6, 2016 at 13:08
  • Please, don't post questions in the answer box. Thanks. Commented Sep 6, 2016 at 13:28
  • If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review
    – rcs
    Commented Sep 6, 2016 at 15:00

1 Answer 1

1

Try something like this.

{
     line-join: round;
     line-width:3;
     line-color:blue; 
     ::decoration {
           marker-type:arrow;       
           marker-placement:vertex-last;
      }
}

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.