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.

  • 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. – alphabetasoup Jan 17 '15 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; } – Loubna barra Sep 6 '16 at 13:08
  • Please, don't post questions in the answer box. Thanks. – Andre Silva Sep 6 '16 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 Sep 6 '16 at 15:00
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, privacy policy and cookie policy

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